home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-07-05 | 81.8 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: GDVideo.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Fri Jul 5 01:24:57 1996, modified Fri Jul 5 01:24:57 1996, creator 'CWIE', type ASCII, 81027 bytes "GDVideo.c" , at 0x13d03 2336 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 47 44 56 69 64 65 | 6f 2e 63 00 00 00 00 00 |..GDVide|o.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 01 3c 83 00 | 00 09 20 ae 02 57 a9 ae |.....<..|.. ..W..|
|00000060| 02 57 a9 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.W......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 06 92 00 00 |........|........|
|00000080| 2f 2a 20 0d 47 44 56 69 | 64 65 6f 2e 63 0d 43 6f |/* .GDVi|deo.c.Co|
|00000090| 70 79 72 69 67 68 74 20 | a9 20 31 39 38 39 2d 31 |pyright |. 1989-1|
|000000a0| 39 39 36 20 44 65 6e 69 | 73 20 47 2e 20 50 65 6c |996 Deni|s G. Pel|
|000000b0| 6c 69 0d 0d 43 6f 6d 70 | 6c 65 74 65 20 73 65 74 |li..Comp|lete set|
|000000c0| 20 6f 66 20 72 6f 75 74 | 69 6e 65 73 20 74 6f 20 | of rout|ines to |
|000000d0| 63 6f 6e 74 72 6f 6c 20 | 76 69 64 65 6f 20 64 72 |control |video dr|
|000000e0| 69 76 65 72 73 20 64 69 | 72 65 63 74 6c 79 2c 20 |ivers di|rectly, |
|000000f0| 62 79 70 61 73 73 69 6e | 67 0d 51 75 69 63 6b 44 |bypassin|g.QuickD|
|00000100| 72 61 77 27 73 20 43 6f | 6c 6f 72 20 61 6e 64 20 |raw's Co|lor and |
|00000110| 50 61 6c 65 74 74 65 20 | 4d 61 6e 61 67 65 72 73 |Palette |Managers|
|00000120| 2e 20 54 68 65 72 65 20 | 69 73 20 61 20 73 65 70 |. There |is a sep|
|00000130| 61 72 61 74 65 20 66 75 | 6e 63 74 69 6f 6e 20 63 |arate fu|nction c|
|00000140| 61 6c 6c 20 66 6f 72 0d | 65 61 63 68 20 6f 66 20 |all for.|each of |
|00000150| 74 68 65 20 43 6f 6e 74 | 72 6f 6c 20 61 6e 64 20 |the Cont|rol and |
|00000160| 53 74 61 74 75 73 20 43 | 61 6c 6c 73 20 28 63 73 |Status C|alls (cs|
|00000170| 63 29 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 62 |c) imple|mented b|
|00000180| 79 20 76 69 64 65 6f 20 | 64 72 69 76 65 72 73 2e |y video |drivers.|
|00000190| 20 54 68 65 79 0d 61 72 | 65 20 64 65 73 63 72 69 | They.ar|e descri|
|000001a0| 62 65 64 20 69 6e 20 44 | 65 73 69 67 6e 69 6e 67 |bed in D|esigning|
|000001b0| 20 43 61 72 64 73 20 61 | 6e 64 20 44 72 69 76 65 | Cards a|nd Drive|
|000001c0| 72 73 2c 20 33 72 64 20 | 45 64 2e 2c 20 63 68 61 |rs, 3rd |Ed., cha|
|000001d0| 70 74 65 72 20 39 2e 20 | 41 20 66 65 77 20 6e 65 |pter 9. |A few ne|
|000001e0| 77 0d 63 61 6c 6c 73 20 | 61 72 65 20 64 6f 63 75 |w.calls |are docu|
|000001f0| 6d 65 6e 74 65 64 20 69 | 6e 20 74 68 65 20 44 69 |mented i|n the Di|
|00000200| 73 70 6c 61 79 20 44 65 | 76 69 63 65 20 44 72 69 |splay De|vice Dri|
|00000210| 76 65 72 20 47 75 69 64 | 65 20 44 65 76 65 6c 6f |ver Guid|e Develo|
|00000220| 70 65 72 20 4e 6f 74 65 | 2c 20 77 68 69 63 68 0d |per Note|, which.|
|00000230| 61 70 70 65 61 72 65 64 | 20 6f 6e 20 74 68 65 20 |appeared| on the |
|00000240| 4a 61 6e 75 61 72 79 20 | 27 39 34 20 44 65 76 65 |January |'94 Deve|
|00000250| 6c 6f 70 65 72 20 43 44 | 2e 0d 0d 54 68 69 73 20 |loper CD|...This |
|00000260| 66 69 6c 65 20 61 6c 73 | 6f 20 63 6f 6e 74 61 69 |file als|o contai|
|00000270| 6e 73 20 73 65 76 65 72 | 61 6c 20 6f 74 68 65 72 |ns sever|al other|
|00000280| 20 68 65 6c 70 66 75 6c | 20 72 6f 75 74 69 6e 65 | helpful| routine|
|00000290| 73 20 74 68 61 74 20 64 | 65 61 6c 20 77 69 74 68 |s that d|eal with|
|000002a0| 20 76 69 64 65 6f 0d 64 | 65 76 69 63 65 20 64 72 | video.d|evice dr|
|000002b0| 69 76 65 72 73 2e 20 46 | 6f 72 20 62 61 63 6b 67 |ivers. F|or backg|
|000002c0| 72 6f 75 6e 64 2c 20 72 | 65 61 64 20 d2 56 69 64 |round, r|ead .Vid|
|000002d0| 65 6f 20 73 79 6e 63 68 | d3 2e 0d 0d 47 44 53 65 |eo synch|....GDSe|
|000002e0| 74 45 6e 74 72 69 65 73 | 0d 0d 54 68 65 20 6d 6f |tEntries|..The mo|
|000002f0| 73 74 20 75 73 65 66 75 | 6c 20 72 6f 75 74 69 6e |st usefu|l routin|
|00000300| 65 20 69 6e 20 74 68 69 | 73 20 66 69 6c 65 20 69 |e in thi|s file i|
|00000310| 73 20 47 44 53 65 74 45 | 6e 74 72 69 65 73 2e 20 |s GDSetE|ntries. |
|00000320| 49 74 20 69 6d 70 6c 65 | 6d 65 6e 74 73 20 61 20 |It imple|ments a |
|00000330| 63 73 63 53 65 74 45 6e | 74 72 69 65 73 20 43 6f |cscSetEn|tries Co|
|00000340| 6e 74 72 6f 6c 20 0d 63 | 61 6c 6c 20 74 6f 20 74 |ntrol .c|all to t|
|00000350| 68 65 20 76 69 64 65 6f | 20 64 72 69 76 65 72 2e |he video| driver.|
|00000360| 20 54 68 69 73 20 64 69 | 72 65 63 74 6c 79 20 73 | This di|rectly s|
|00000370| 65 74 73 20 74 68 65 20 | 76 69 64 65 6f 20 64 65 |ets the |video de|
|00000380| 76 69 63 65 27 73 20 63 | 6f 6c 6f 72 20 6c 6f 6f |vice's c|olor loo|
|00000390| 6b 75 70 20 74 61 62 6c | 65 20 28 63 6c 75 74 29 |kup tabl|e (clut)|
|000003a0| 2e 0d 28 63 73 63 53 65 | 74 45 6e 74 72 69 65 73 |..(cscSe|tEntries|
|000003b0| 20 69 73 20 64 6f 63 75 | 6d 65 6e 74 65 64 20 69 | is docu|mented i|
|000003c0| 6e 20 41 70 70 6c 65 27 | 73 20 62 6f 6f 6b 73 20 |n Apple'|s books |
|000003d0| 63 61 6c 6c 65 64 0d 44 | 65 73 69 67 6e 69 6e 67 |called.D|esigning|
|000003e0| 20 43 61 72 64 73 20 61 | 6e 64 20 44 72 69 76 65 | Cards a|nd Drive|
|000003f0| 72 73 20 61 6e 64 20 44 | 65 73 69 67 6e 69 6e 67 |rs and D|esigning|
|00000400| 20 50 43 49 20 43 61 72 | 64 73 20 61 6e 64 20 44 | PCI Car|ds and D|
|00000410| 72 69 76 65 72 73 2e 29 | 0d 0d 41 70 70 6c 65 20 |rivers.)|..Apple |
|00000420| 61 6c 73 6f 20 70 72 6f | 76 69 64 65 73 20 61 20 |also pro|vides a |
|00000430| 68 69 67 68 2d 6c 65 76 | 65 6c 20 53 65 74 45 6e |high-lev|el SetEn|
|00000440| 74 72 69 65 73 28 29 20 | 63 61 6c 6c 2c 20 77 68 |tries() |call, wh|
|00000450| 69 63 68 20 69 73 20 73 | 75 70 65 72 66 69 63 69 |ich is s|uperfici|
|00000460| 61 6c 6c 79 20 73 69 6d | 69 6c 61 72 2c 20 0d 62 |ally sim|ilar, .b|
|00000470| 75 74 20 69 74 20 67 65 | 74 73 20 69 6e 74 65 72 |ut it ge|ts inter|
|00000480| 70 72 65 74 65 64 20 62 | 79 20 51 75 69 63 6b 44 |preted b|y QuickD|
|00000490| 72 61 77 20 69 6e 20 63 | 6f 6d 70 6c 69 63 61 74 |raw in c|omplicat|
|000004a0| 65 64 20 77 61 79 73 20 | 62 65 66 6f 72 65 20 75 |ed ways |before u|
|000004b0| 6c 74 69 6d 61 74 65 6c | 79 20 0d 63 61 75 73 69 |ltimatel|y .causi|
|000004c0| 6e 67 20 61 20 63 73 63 | 53 65 74 45 6e 74 72 69 |ng a csc|SetEntri|
|000004d0| 65 73 20 43 6f 6e 74 72 | 6f 6c 20 63 61 6c 6c 20 |es Contr|ol call |
|000004e0| 74 6f 20 74 68 65 20 76 | 69 64 65 6f 20 64 72 69 |to the v|ideo dri|
|000004f0| 76 65 72 2e 20 0d 28 53 | 65 74 45 6e 74 72 69 65 |ver. .(S|etEntrie|
|00000500| 73 20 69 73 20 64 6f 63 | 75 6d 65 6e 74 65 64 20 |s is doc|umented |
|00000510| 69 6e 20 49 6e 73 69 64 | 65 20 4d 61 63 69 6e 74 |in Insid|e Macint|
|00000520| 6f 73 68 2e 29 20 0d 0d | 49 20 61 6c 77 61 79 73 |osh.) ..|I always|
|00000530| 20 70 72 65 66 65 72 20 | 47 44 53 65 74 45 6e 74 | prefer |GDSetEnt|
|00000540| 72 69 65 73 2c 20 62 65 | 63 61 75 73 65 20 49 20 |ries, be|cause I |
|00000550| 77 61 6e 74 20 64 69 72 | 65 63 74 20 63 6f 6e 74 |want dir|ect cont|
|00000560| 72 6f 6c 20 6f 76 65 72 | 20 74 68 65 20 63 6c 75 |rol over| the clu|
|00000570| 74 2e 0d 0d 54 48 45 20 | 4d 4f 52 45 2d 55 53 45 |t...THE |MORE-USE|
|00000580| 46 55 4c 20 28 48 49 47 | 48 2d 4c 45 56 45 4c 29 |FUL (HIG|H-LEVEL)|
|00000590| 20 52 4f 55 54 49 4e 45 | 53 3a 20 28 69 6e 20 61 | ROUTINE|S: (in a|
|000005a0| 6c 70 68 61 62 65 74 69 | 63 61 6c 20 6f 72 64 65 |lphabeti|cal orde|
|000005b0| 72 29 0d 0d 63 68 61 72 | 20 2a 47 44 43 61 72 64 |r)..char| *GDCard|
|000005c0| 4e 61 6d 65 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |Name(GDH|andle de|
|000005d0| 76 69 63 65 29 3b 0d 52 | 65 74 75 72 6e 73 20 74 |vice);.R|eturns t|
|000005e0| 68 65 20 61 64 64 72 65 | 73 73 20 6f 66 20 61 20 |he addre|ss of a |
|000005f0| 43 20 73 74 72 69 6e 67 | 20 63 6f 6e 74 61 69 6e |C string| contain|
|00000600| 69 6e 67 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 |ing the |name of |
|00000610| 74 68 65 20 76 69 64 65 | 6f 20 63 61 72 64 2e 20 |the vide|o card. |
|00000620| 59 6f 75 0d 73 68 6f 75 | 6c 64 20 63 61 6c 6c 20 |You.shou|ld call |
|00000630| 44 69 73 70 6f 73 65 50 | 74 72 28 29 20 6f 6e 20 |DisposeP|tr() on |
|00000640| 74 68 65 20 72 65 74 75 | 72 6e 65 64 20 73 74 72 |the retu|rned str|
|00000650| 69 6e 67 20 77 68 65 6e | 20 79 6f 75 20 6e 6f 20 |ing when| you no |
|00000660| 6c 6f 6e 67 65 72 20 6e | 65 65 64 20 69 74 2e 0d |longer n|eed it..|
|00000670| 54 61 6b 65 73 20 61 62 | 6f 75 74 20 31 2e 35 20 |Takes ab|out 1.5 |
|00000680| 6d 73 20 62 65 63 61 75 | 73 65 20 41 70 70 6c 65 |ms becau|se Apple|
|00000690| 27 73 20 73 6c 6f 74 20 | 72 6f 75 74 69 6e 65 73 |'s slot |routines|
|000006a0| 20 61 72 65 20 76 65 72 | 79 20 73 6c 6f 77 2e 20 | are ver|y slow. |
|000006b0| 0d 0d 73 68 6f 72 74 20 | 47 44 43 6c 75 74 53 69 |..short |GDClutSi|
|000006c0| 7a 65 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |ze(GDHan|dle devi|
|000006d0| 63 65 29 3b 0d 52 65 74 | 75 72 6e 73 20 74 68 65 |ce);.Ret|urns the|
|000006e0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 65 6e 74 72 69 | number |of entri|
|000006f0| 65 73 20 69 6e 20 74 68 | 65 20 76 69 64 65 6f 20 |es in th|e video |
|00000700| 64 72 69 76 65 72 27 73 | 20 63 6c 75 74 20 69 6e |driver's| clut in|
|00000710| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 76 69 64 | the cur|rent vid|
|00000720| 65 6f 0d 6d 6f 64 65 20 | 28 69 2e 65 2e 20 63 75 |eo.mode |(i.e. cu|
|00000730| 72 72 65 6e 74 20 70 69 | 78 65 6c 20 73 69 7a 65 |rrent pi|xel size|
|00000740| 29 2e 20 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 2e |). Video|Toolbox.|
|00000750| 68 20 64 65 66 69 6e 65 | 73 20 61 20 70 72 65 70 |h define|s a prep|
|00000760| 72 6f 63 65 73 73 6f 72 | 20 6d 61 63 72 6f 0d 47 |rocessor| macro.G|
|00000770| 44 43 4c 55 54 53 49 5a | 45 28 64 65 76 69 63 65 |DCLUTSIZ|E(device|
|00000780| 29 20 74 68 61 74 20 65 | 78 70 61 6e 64 73 20 74 |) that e|xpands t|
|00000790| 6f 20 65 71 75 69 76 61 | 6c 65 6e 74 20 69 6e 6c |o equiva|lent inl|
|000007a0| 69 6e 65 20 63 6f 64 65 | 2e 0d 0d 6c 6f 6e 67 20 |ine code|...long |
|000007b0| 47 44 43 6f 6c 6f 72 73 | 28 47 44 48 61 6e 64 6c |GDColors|(GDHandl|
|000007c0| 65 20 64 65 76 69 63 65 | 29 0d 4e 75 6d 62 65 72 |e device|).Number|
|000007d0| 20 6f 66 20 63 6f 6c 6f | 72 73 2c 20 69 6e 20 74 | of colo|rs, in t|
|000007e0| 68 65 20 63 75 72 72 65 | 6e 74 20 6d 6f 64 65 2e |he curre|nt mode.|
|000007f0| 0d 0d 73 68 6f 72 74 20 | 47 44 44 61 63 53 69 7a |..short |GDDacSiz|
|00000800| 65 28 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |e(GDHand|le devic|
|00000810| 65 29 0d 46 69 67 75 72 | 65 73 20 6f 75 74 20 68 |e).Figur|es out h|
|00000820| 6f 77 20 6d 61 6e 79 20 | 62 69 74 73 20 69 6e 20 |ow many |bits in |
|00000830| 74 68 65 20 76 69 64 65 | 6f 20 64 61 63 2e 0d 0d |the vide|o dac...|
|00000840| 4f 53 45 72 72 20 47 44 | 53 65 74 44 65 6c 61 79 |OSErr GD|SetDelay|
|00000850| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00000860| 2c 42 6f 6f 6c 65 61 6e | 20 64 6f 6e 74 57 61 69 |,Boolean| dontWai|
|00000870| 74 46 6f 72 56 42 4c 2c | 64 6f 75 62 6c 65 20 6e |tForVBL,|double n|
|00000880| 61 6e 6f 73 65 63 6f 6e | 64 73 29 3b 0d 4f 53 45 |anosecon|ds);.OSE|
|00000890| 72 72 20 47 44 47 65 74 | 44 65 6c 61 79 28 47 44 |rr GDGet|Delay(GD|
|000008a0| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 2c 42 6f |Handle d|evice,Bo|
|000008b0| 6f 6c 65 61 6e 20 2a 64 | 6f 6e 74 57 61 69 74 46 |olean *d|ontWaitF|
|000008c0| 6f 72 56 42 4c 50 74 72 | 2c 64 6f 75 62 6c 65 20 |orVBLPtr|,double |
|000008d0| 2a 6e 61 6e 6f 73 65 63 | 6f 6e 64 73 50 74 72 29 |*nanosec|ondsPtr)|
|000008e0| 3b 0d 54 68 65 73 65 20 | 74 77 6f 20 72 6f 75 74 |;.These |two rout|
|000008f0| 69 6e 65 73 20 73 75 70 | 70 6f 72 74 20 66 65 61 |ines sup|port fea|
|00000900| 74 75 72 65 73 2c 20 69 | 2e 65 2e 20 63 73 63 53 |tures, i|.e. cscS|
|00000910| 65 74 54 69 6d 65 44 65 | 6c 61 79 73 20 61 6e 64 |etTimeDe|lays and|
|00000920| 20 63 73 63 47 65 74 54 | 69 6d 65 44 65 6c 61 79 | cscGetT|imeDelay|
|00000930| 73 2c 20 0d 75 6e 69 71 | 75 65 20 74 6f 20 74 68 |s, .uniq|ue to th|
|00000940| 65 20 62 75 69 6c 74 2d | 69 6e 20 76 69 64 65 6f |e built-|in video|
|00000950| 20 64 72 69 76 65 72 20 | 6f 66 20 74 68 65 0d 50 | driver |of the.P|
|00000960| 6f 77 65 72 4d 61 63 20 | 37 35 30 30 20 61 6e 64 |owerMac |7500 and|
|00000970| 20 38 35 30 30 2e 20 42 | 6f 74 68 20 72 6f 75 74 | 8500. B|oth rout|
|00000980| 69 6e 65 73 20 77 69 6c | 6c 20 6d 65 72 65 6c 79 |ines wil|l merely|
|00000990| 20 72 65 74 75 72 6e 20 | 69 6e 6e 6f 63 75 6f 75 | return |innocuou|
|000009a0| 73 20 65 72 72 6f 72 73 | 20 28 2d 31 37 0d 61 6e |s errors| (-17.an|
|000009b0| 64 20 2d 31 38 29 20 69 | 66 20 75 73 65 64 20 77 |d -18) i|f used w|
|000009c0| 69 74 68 20 61 6e 79 20 | 6f 74 68 65 72 20 76 69 |ith any |other vi|
|000009d0| 64 65 6f 20 64 72 69 76 | 65 72 2e 20 4c 69 6b 65 |deo driv|er. Like|
|000009e0| 20 6d 6f 73 74 20 76 69 | 64 65 6f 20 64 72 69 76 | most vi|deo driv|
|000009f0| 65 72 73 2c 20 74 68 65 | 0d 37 35 30 30 2f 38 35 |ers, the|.7500/85|
|00000a00| 30 30 20 76 69 64 65 6f | 20 64 72 69 76 65 72 20 |00 video| driver |
|00000a10| 6e 6f 72 6d 61 6c 6c 79 | 20 77 61 69 74 73 20 66 |normally| waits f|
|00000a20| 6f 72 20 56 42 4c 20 77 | 68 65 6e 20 6c 6f 61 64 |or VBL w|hen load|
|00000a30| 69 6e 67 20 74 68 65 20 | 43 4c 55 54 2c 20 62 75 |ing the |CLUT, bu|
|00000a40| 74 20 74 68 69 73 20 63 | 61 6e 0d 62 65 20 6f 76 |t this c|an.be ov|
|00000a50| 65 72 72 69 64 65 6e 20 | 62 79 20 74 68 65 20 42 |erriden |by the B|
|00000a60| 6f 6f 6c 65 61 6e 20 70 | 61 72 61 6d 65 74 65 72 |oolean p|arameter|
|00000a70| 20 64 6f 6e 74 57 61 69 | 74 46 6f 72 56 42 4c 2c | dontWai|tForVBL,|
|00000a80| 20 69 6e 20 77 68 69 63 | 68 20 63 61 73 65 2c 20 | in whic|h case, |
|00000a90| 66 72 6f 6d 20 74 68 65 | 6e 20 6f 6e 0d 28 75 6e |from the|n on.(un|
|00000aa0| 74 69 6c 20 69 74 27 73 | 20 63 68 61 6e 67 65 64 |til it's| changed|
|00000ab0| 20 61 67 61 69 6e 20 6f | 72 20 74 68 65 20 6d 61 | again o|r the ma|
|00000ac0| 63 68 69 6e 65 20 69 73 | 20 72 65 62 6f 6f 74 65 |chine is| reboote|
|00000ad0| 64 29 20 74 68 65 20 64 | 72 69 76 65 72 20 77 69 |d) the d|river wi|
|00000ae0| 6c 6c 20 6c 6f 61 64 20 | 74 68 65 0d 43 4c 55 54 |ll load |the.CLUT|
|00000af0| 20 69 6d 6d 65 64 69 61 | 74 65 6c 79 20 77 68 65 | immedia|tely whe|
|00000b00| 6e 20 69 74 27 73 20 63 | 61 6c 6c 65 64 2c 20 77 |n it's c|alled, w|
|00000b10| 69 74 68 6f 75 74 20 77 | 61 69 74 69 6e 67 20 66 |ithout w|aiting f|
|00000b20| 6f 72 20 56 42 4c 2e 20 | 54 68 65 20 73 65 63 6f |or VBL. |The seco|
|00000b30| 6e 64 20 66 65 61 74 75 | 72 65 20 69 73 0d 74 68 |nd featu|re is.th|
|00000b40| 61 74 20 74 68 65 20 76 | 69 64 65 6f 20 64 72 69 |at the v|ideo dri|
|00000b50| 76 65 72 20 6e 6f 72 6d | 61 6c 6c 79 20 77 61 69 |ver norm|ally wai|
|00000b60| 74 73 20 38 30 30 20 6e | 73 20 61 66 74 65 72 20 |ts 800 n|s after |
|00000b70| 6c 6f 61 64 69 6e 67 20 | 65 61 63 68 20 52 47 42 |loading |each RGB|
|00000b80| 20 74 72 69 70 6c 65 74 | 20 74 6f 20 74 68 65 0d | triplet| to the.|
|00000b90| 43 4c 55 54 2c 20 22 74 | 6f 20 61 6c 6c 6f 77 20 |CLUT, "t|o allow |
|00000ba0| 66 6f 72 20 74 68 65 20 | 43 4c 55 54 20 74 6f 20 |for the |CLUT to |
|00000bb0| 73 65 74 74 6c 65 20 61 | 6e 64 20 69 6e 63 72 65 |settle a|nd incre|
|00000bc0| 6d 65 6e 74 20 69 74 73 | 20 61 64 64 72 65 73 73 |ment its| address|
|00000bd0| 22 2c 20 61 6e 64 20 74 | 68 61 74 20 74 69 6d 65 |", and t|hat time|
|00000be0| 0d 63 61 6e 20 62 65 20 | 73 65 74 20 62 79 20 74 |.can be |set by t|
|00000bf0| 68 65 20 70 61 72 61 6d | 65 74 65 72 20 22 6e 61 |he param|eter "na|
|00000c00| 6e 6f 73 65 63 6f 6e 64 | 73 22 2e 20 47 44 47 65 |nosecond|s". GDGe|
|00000c10| 74 44 65 6c 61 79 28 29 | 20 61 6c 6c 6f 77 73 20 |tDelay()| allows |
|00000c20| 79 6f 75 20 74 6f 20 72 | 65 61 64 20 74 68 65 0d |you to r|ead the.|
|00000c30| 63 75 72 72 65 6e 74 20 | 73 65 74 74 69 6e 67 20 |current |setting |
|00000c40| 6f 66 20 62 6f 74 68 20 | 70 61 72 61 6d 65 74 65 |of both |paramete|
|00000c50| 72 73 2e 20 47 44 53 65 | 74 44 65 6c 61 79 28 29 |rs. GDSe|tDelay()|
|00000c60| 20 61 6c 6c 6f 77 73 20 | 79 6f 75 20 74 6f 20 73 | allows |you to s|
|00000c70| 65 74 20 62 6f 74 68 0d | 70 61 72 61 6d 65 74 65 |et both.|paramete|
|00000c80| 72 73 2e 20 49 66 20 74 | 68 65 20 73 75 70 70 6c |rs. If t|he suppl|
|00000c90| 69 65 64 20 76 61 6c 75 | 65 20 6f 66 20 22 6e 61 |ied valu|e of "na|
|00000ca0| 6e 6f 73 65 63 6f 6e 64 | 73 22 20 69 73 20 69 6e |nosecond|s" is in|
|00000cb0| 66 69 6e 69 74 65 20 6f | 72 20 4e 41 4e 20 74 68 |finite o|r NAN th|
|00000cc0| 65 6e 20 69 74 27 73 0d | 69 67 6e 6f 72 65 64 20 |en it's.|ignored |
|00000cd0| 61 6e 64 20 6f 6e 6c 79 | 20 22 64 6f 6e 74 57 61 |and only| "dontWa|
|00000ce0| 69 74 46 6f 72 56 42 4c | 22 20 69 73 20 73 65 74 |itForVBL|" is set|
|00000cf0| 2e 20 54 68 65 20 37 35 | 30 30 2f 38 35 30 30 20 |. The 75|00/8500 |
|00000d00| 76 69 64 65 6f 20 64 72 | 69 76 65 72 20 77 61 73 |video dr|iver was|
|00000d10| 20 77 72 69 74 74 65 6e | 0d 62 79 20 41 70 70 6c | written|.by Appl|
|00000d20| 65 20 45 6e 67 69 6e 65 | 65 72 20 46 65 72 6e 61 |e Engine|er Ferna|
|00000d30| 6e 64 6f 20 55 72 62 69 | 6e 61 2c 20 6e 61 6e 6f |ndo Urbi|na, nano|
|00000d40| 40 61 70 70 6c 65 2e 63 | 6f 6d 2e 20 47 44 53 65 |@apple.c|om. GDSe|
|00000d50| 74 44 65 6c 61 79 28 29 | 20 61 6e 64 20 47 44 53 |tDelay()| and GDS|
|00000d60| 65 74 44 65 6c 61 79 28 | 29 0d 77 65 72 65 20 77 |etDelay(|).were w|
|00000d70| 72 69 74 74 65 6e 20 62 | 79 20 44 65 6e 69 73 20 |ritten b|y Denis |
|00000d80| 50 65 6c 6c 69 2c 20 74 | 6f 20 61 6c 6c 6f 77 20 |Pelli, t|o allow |
|00000d90| 63 6f 6e 76 65 6e 69 65 | 6e 74 20 61 63 63 65 73 |convenie|nt acces|
|00000da0| 73 20 74 6f 20 46 65 72 | 6e 61 6e 64 6f 27 73 20 |s to Fer|nando's |
|00000db0| 63 75 73 74 6f 6d 0d 63 | 6f 6e 74 72 6f 6c 20 61 |custom.c|ontrol a|
|00000dc0| 6e 64 20 73 74 61 74 75 | 73 20 64 72 69 76 65 72 |nd statu|s driver|
|00000dd0| 20 63 61 6c 6c 73 2e 20 | 4e 6f 74 65 20 74 68 61 | calls. |Note tha|
|00000de0| 74 20 46 65 72 6e 61 6e | 64 6f 20 55 72 62 69 6e |t Fernan|do Urbin|
|00000df0| 61 20 68 61 73 20 61 6c | 73 6f 20 73 75 70 70 6c |a has al|so suppl|
|00000e00| 69 65 64 20 61 0d 6e 65 | 77 65 72 20 76 65 72 73 |ied a.ne|wer vers|
|00000e10| 69 6f 6e 20 6f 66 20 74 | 68 69 73 20 64 72 69 76 |ion of t|his driv|
|00000e20| 65 72 20 28 69 6e 63 6c | 75 64 65 64 20 69 6e 20 |er (incl|uded in |
|00000e30| 74 68 65 20 56 69 64 65 | 6f 54 6f 6f 6c 62 6f 78 |the Vide|oToolbox|
|00000e40| 29 20 74 68 61 74 20 73 | 75 70 70 6f 72 74 73 20 |) that s|upports |
|00000e50| 73 65 76 65 72 61 6c 0d | 65 78 74 72 61 20 72 65 |several.|extra re|
|00000e60| 73 6f 6c 75 74 69 6f 6e | 73 2c 20 6f 66 20 77 68 |solution|s, of wh|
|00000e70| 69 63 68 20 74 68 65 20 | 6d 6f 73 74 20 6e 6f 74 |ich the |most not|
|00000e80| 65 77 6f 72 74 68 79 20 | 69 73 20 36 34 30 78 34 |eworthy |is 640x4|
|00000e90| 38 30 78 31 32 30 20 48 | 7a 2c 20 77 68 69 63 68 |80x120 H|z, which|
|00000ea0| 20 77 6f 72 6b 73 0d 77 | 65 6c 6c 20 6f 6e 20 74 | works.w|ell on t|
|00000eb0| 68 65 20 41 70 70 6c 65 | 20 31 37 22 20 4d 75 6c |he Apple| 17" Mul|
|00000ec0| 74 69 73 63 61 6e 2e 0d | 0d 54 68 75 73 20 66 61 |tiscan..|.Thus fa|
|00000ed0| 72 2c 20 75 73 69 6e 67 | 20 76 69 73 75 61 6c 20 |r, using| visual |
|00000ee0| 69 6e 73 70 65 63 74 69 | 6f 6e 20 69 6e 20 54 69 |inspecti|on in Ti|
|00000ef0| 6d 65 56 69 64 65 6f 2c | 20 49 27 76 65 20 62 65 |meVideo,| I've be|
|00000f00| 65 6e 20 75 6e 61 62 6c | 65 20 74 6f 20 6e 6f 74 |en unabl|e to not|
|00000f10| 69 63 65 20 61 6e 79 0d | 62 61 64 20 65 66 66 65 |ice any.|bad effe|
|00000f20| 63 74 73 20 6f 66 20 6e | 6f 74 20 77 61 69 74 69 |cts of n|ot waiti|
|00000f30| 6e 67 20 66 6f 72 20 56 | 42 4c 20 61 6e 64 20 72 |ng for V|BL and r|
|00000f40| 65 64 75 63 69 6e 67 20 | 74 68 65 20 77 61 69 74 |educing |the wait|
|00000f50| 69 6e 67 20 69 6e 74 65 | 72 76 61 6c 20 66 72 6f |ing inte|rval fro|
|00000f60| 6d 20 38 30 30 20 6e 73 | 0d 74 6f 20 7a 65 72 6f |m 800 ns|.to zero|
|00000f70| 2e 20 49 20 61 73 6b 65 | 64 20 46 65 72 6e 61 6e |. I aske|d Fernan|
|00000f80| 64 6f 20 55 72 62 69 6e | 61 2c 20 6e 61 6e 6f 40 |do Urbin|a, nano@|
|00000f90| 61 70 70 6c 65 2e 63 6f | 6d 2c 20 61 62 6f 75 74 |apple.co|m, about|
|00000fa0| 20 69 74 2c 20 73 69 6e | 63 65 20 68 65 20 70 75 | it, sin|ce he pu|
|00000fb0| 74 20 69 6e 20 74 68 65 | 0d 64 65 6c 61 79 73 20 |t in the|.delays |
|00000fc0| 62 65 63 61 75 73 65 20 | 68 65 20 22 64 6f 65 73 |because |he "does|
|00000fd0| 20 69 6e 64 65 65 64 20 | 67 65 74 20 61 72 74 69 | indeed |get arti|
|00000fe0| 66 61 63 74 73 20 77 68 | 65 6e 20 75 70 64 61 74 |facts wh|en updat|
|00000ff0| 69 6e 67 20 74 68 65 20 | 43 4c 55 54 20 69 66 20 |ing the |CLUT if |
|00001000| 77 65 20 64 6f 6e 27 74 | 0d 73 75 70 70 72 65 73 |we don't|.suppres|
|00001010| 73 20 69 6e 74 65 72 72 | 75 70 74 73 20 77 68 69 |s interr|upts whi|
|00001020| 6c 65 20 75 70 64 61 74 | 69 6e 67 20 69 74 2e 22 |le updat|ing it."|
|00001030| 20 57 68 61 74 20 77 65 | 72 65 20 74 68 65 20 61 | What we|re the a|
|00001040| 72 74 69 66 61 63 74 73 | 3f 20 46 65 72 6e 61 6e |rtifacts|? Fernan|
|00001050| 64 6f 0d 72 65 70 6c 69 | 65 73 2c 20 22 54 68 65 |do.repli|es, "The|
|00001060| 20 64 65 6c 61 79 73 20 | 61 72 65 20 74 68 65 72 | delays |are ther|
|00001070| 65 20 62 65 63 61 75 73 | 65 20 6f 66 20 68 61 72 |e becaus|e of har|
|00001080| 64 77 61 72 65 20 72 65 | 71 75 69 72 65 6d 65 6e |dware re|quiremen|
|00001090| 74 73 3a 20 20 57 68 65 | 6e 20 77 72 69 74 69 6e |ts: Whe|n writin|
|000010a0| 67 20 74 6f 0d 74 68 65 | 20 43 4c 55 54 20 69 6e |g to.the| CLUT in|
|000010b0| 20 61 20 73 65 6c 66 2d | 69 6e 63 72 65 6d 65 6e | a self-|incremen|
|000010c0| 74 69 6e 67 20 6d 6f 64 | 65 20 74 68 65 20 68 61 |ting mod|e the ha|
|000010d0| 72 64 77 61 72 65 20 72 | 65 71 75 69 72 65 73 20 |rdware r|equires |
|000010e0| 38 30 30 6e 73 20 74 6f | 20 75 70 64 61 74 65 20 |800ns to| update |
|000010f0| 74 68 65 0d 61 64 64 72 | 65 73 73 20 63 6f 75 6e |the.addr|ess coun|
|00001100| 74 65 72 2e 20 20 4f 66 | 20 63 6f 75 72 73 65 2c |ter. Of| course,|
|00001110| 20 74 68 69 73 20 69 73 | 20 77 6f 72 73 74 20 63 | this is| worst c|
|00001120| 61 73 65 2e 20 20 28 20 | 57 65 20 77 72 69 74 65 |ase. ( |We write|
|00001130| 20 74 68 65 20 43 4c 55 | 54 20 73 74 61 72 74 69 | the CLU|T starti|
|00001140| 6e 67 0d 61 64 64 72 65 | 73 73 20 61 6e 64 20 74 |ng.addre|ss and t|
|00001150| 68 65 6e 20 74 68 65 20 | 52 2c 20 47 2c 20 61 6e |hen the |R, G, an|
|00001160| 64 20 42 2e 20 20 41 74 | 20 74 68 65 20 65 6e 64 |d B. At| the end|
|00001170| 20 6f 66 20 74 68 65 20 | 42 2c 20 74 68 65 20 61 | of the |B, the a|
|00001180| 64 64 72 65 73 73 20 63 | 6f 75 6e 74 65 72 20 66 |ddress c|ounter f|
|00001190| 6f 72 0d 74 68 65 20 43 | 4c 55 54 20 77 69 6c 6c |or.the C|LUT will|
|000011a0| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 69 | automat|ically i|
|000011b0| 6e 63 72 65 6d 65 6e 74 | 20 74 6f 20 74 68 65 20 |ncrement| to the |
|000011c0| 6e 65 78 74 20 61 64 64 | 72 65 73 73 2e 29 20 49 |next add|ress.) I|
|000011d0| 20 6e 6f 74 69 63 65 64 | 20 73 6f 6d 65 0d 61 72 | noticed| some.ar|
|000011e0| 74 69 66 61 63 74 73 20 | 77 68 65 6e 20 64 6f 69 |tifacts |when doi|
|000011f0| 6e 67 20 70 61 6c 65 74 | 74 65 20 61 6e 69 6d 61 |ng palet|te anima|
|00001200| 74 69 6f 6e 20 2d 2d 20 | 6f 6e 65 20 6f 66 20 74 |tion -- |one of t|
|00001210| 68 65 20 41 66 74 65 72 | 20 44 61 72 6b 20 6d 6f |he After| Dark mo|
|00001220| 64 75 6c 65 73 20 73 68 | 6f 77 65 64 0d 74 68 69 |dules sh|owed.thi|
|00001230| 73 20 76 65 72 79 20 77 | 65 6c 6c 2e 22 0d 0d 4f |s very w|ell."..O|
|00001240| 53 45 72 72 20 47 44 47 | 65 74 44 69 73 70 6c 61 |SErr GDG|etDispla|
|00001250| 79 4d 6f 64 65 28 47 44 | 48 61 6e 64 6c 65 20 64 |yMode(GD|Handle d|
|00001260| 65 76 69 63 65 2c 75 6e | 73 69 67 6e 65 64 20 6c |evice,un|signed l|
|00001270| 6f 6e 67 20 2a 64 69 73 | 70 6c 61 79 4d 6f 64 65 |ong *dis|playMode|
|00001280| 49 44 50 74 72 0d 09 2c | 75 6e 73 69 67 6e 65 64 |IDPtr..,|unsigned|
|00001290| 20 73 68 6f 72 74 20 2a | 6d 6f 64 65 50 74 72 2c | short *|modePtr,|
|000012a0| 75 6e 73 69 67 6e 65 64 | 20 73 68 6f 72 74 20 2a |unsigned| short *|
|000012b0| 70 61 67 65 50 74 72 2c | 50 74 72 20 2a 62 61 73 |pagePtr,|Ptr *bas|
|000012c0| 65 41 64 64 72 50 74 72 | 29 3b 0d 43 61 6c 6c 73 |eAddrPtr|);.Calls|
|000012d0| 20 63 73 63 47 65 74 43 | 75 72 4d 6f 64 65 2c 20 | cscGetC|urMode, |
|000012e0| 64 6f 63 75 6d 65 6e 74 | 65 64 20 69 6e 20 41 70 |document|ed in Ap|
|000012f0| 70 6c 65 27 73 20 6e 65 | 77 20 44 69 73 70 6c 61 |ple's ne|w Displa|
|00001300| 79 20 44 65 76 69 63 65 | 20 44 72 69 76 65 72 20 |y Device| Driver |
|00001310| 47 75 69 64 65 0d 44 65 | 76 65 6c 6f 70 65 72 20 |Guide.De|veloper |
|00001320| 4e 6f 74 65 20 6f 6e 20 | 74 68 65 20 4a 61 6e 75 |Note on |the Janu|
|00001330| 61 72 79 20 27 39 34 20 | 44 65 76 65 6c 6f 70 65 |ary '94 |Develope|
|00001340| 72 20 43 44 2e 20 54 68 | 65 20 22 64 69 73 70 6c |r CD. Th|e "displ|
|00001350| 61 79 20 6d 6f 64 65 20 | 49 44 22 20 69 73 20 61 |ay mode |ID" is a|
|00001360| 20 6e 65 77 0d 70 61 72 | 61 6d 65 74 65 72 2c 20 | new.par|ameter, |
|00001370| 74 6f 20 73 75 70 70 6f | 72 74 20 6d 75 6c 74 69 |to suppo|rt multi|
|00001380| 2d 72 65 73 6f 6c 75 74 | 69 6f 6e 20 64 69 73 70 |-resolut|ion disp|
|00001390| 6c 61 79 73 2e 20 45 61 | 63 68 20 64 69 73 70 6c |lays. Ea|ch displ|
|000013a0| 61 79 20 6d 6f 64 65 20 | 6d 61 79 20 68 61 76 65 |ay mode |may have|
|000013b0| 0d 6d 75 6c 74 69 70 6c | 65 20 70 69 78 65 6c 20 |.multipl|e pixel |
|000013c0| 64 65 70 74 68 73 20 28 | 77 68 69 63 68 2c 20 63 |depths (|which, c|
|000013d0| 6f 6e 66 75 73 69 6e 67 | 6c 79 2c 20 68 61 76 65 |onfusing|ly, have|
|000013e0| 20 61 6c 73 6f 20 62 65 | 65 6e 20 63 61 6c 6c 65 | also be|en calle|
|000013f0| 64 20 22 6d 6f 64 65 73 | 22 29 2e 20 54 68 69 73 |d "modes|"). This|
|00001400| 0d 63 61 6c 6c 20 77 69 | 6c 6c 20 6f 6e 6c 79 20 |.call wi|ll only |
|00001410| 62 65 20 75 73 65 66 75 | 6c 20 69 66 20 74 68 65 |be usefu|l if the|
|00001420| 20 44 69 73 70 6c 61 79 | 20 4d 61 6e 61 67 65 72 | Display| Manager|
|00001430| 20 69 73 20 70 72 65 73 | 65 6e 74 20 28 72 65 71 | is pres|ent (req|
|00001440| 75 69 72 65 73 20 50 6f | 77 65 72 50 43 20 6f 72 |uires Po|werPC or|
|00001450| 0d 53 79 73 74 65 6d 20 | 37 2e 35 29 20 61 6e 64 |.System |7.5) and|
|00001460| 20 69 66 20 79 6f 75 27 | 72 65 20 75 73 69 6e 67 | if you'|re using|
|00001470| 20 74 68 65 20 44 69 73 | 70 6c 61 79 20 4d 61 6e | the Dis|play Man|
|00001480| 61 67 65 72 2c 20 77 68 | 69 63 68 20 69 73 20 64 |ager, wh|ich is d|
|00001490| 6f 63 75 6d 65 6e 74 65 | 64 20 69 6e 20 61 0d 63 |ocumente|d in a.c|
|000014a0| 68 61 70 74 65 72 20 69 | 6e 20 49 6e 73 69 64 65 |hapter i|n Inside|
|000014b0| 20 4d 61 63 69 6e 74 6f | 73 68 3a 41 64 76 61 6e | Macinto|sh:Advan|
|000014c0| 63 65 64 20 43 6f 6c 6f | 72 20 49 6d 61 67 69 6e |ced Colo|r Imagin|
|000014d0| 67 2c 20 77 68 69 63 68 | 20 74 68 75 73 20 66 61 |g, which| thus fa|
|000014e0| 72 20 68 61 73 20 61 70 | 70 65 61 72 65 64 0d 6f |r has ap|peared.o|
|000014f0| 6e 6c 79 20 69 6e 20 64 | 72 61 66 74 20 66 6f 72 |nly in d|raft for|
|00001500| 6d 20 6f 6e 20 74 68 65 | 20 44 65 63 65 6d 62 65 |m on the| Decembe|
|00001510| 72 20 27 39 34 20 44 65 | 76 65 6c 6f 70 65 72 20 |r '94 De|veloper |
|00001520| 43 44 2e 20 54 68 65 20 | 63 61 6c 6c 20 72 65 74 |CD. The |call ret|
|00001530| 75 72 6e 73 20 61 6e 20 | 65 72 72 6f 72 0d 69 66 |urns an |error.if|
|00001540| 20 74 68 65 20 76 69 64 | 65 6f 20 64 72 69 76 65 | the vid|eo drive|
|00001550| 72 20 64 6f 65 73 20 6e | 6f 74 20 73 75 70 70 6f |r does n|ot suppo|
|00001560| 72 74 20 74 68 65 20 44 | 69 73 70 6c 61 79 20 4d |rt the D|isplay M|
|00001570| 61 6e 61 67 65 72 2e 20 | 55 4e 54 45 53 54 45 44 |anager. |UNTESTED|
|00001580| 21 21 0d 0d 4f 53 45 72 | 72 20 47 44 47 65 74 45 |!!..OSEr|r GDGetE|
|00001590| 6e 74 72 69 65 73 28 47 | 44 48 61 6e 64 6c 65 20 |ntries(G|DHandle |
|000015a0| 64 65 76 69 63 65 2c 73 | 68 6f 72 74 20 73 74 61 |device,s|hort sta|
|000015b0| 72 74 2c 73 68 6f 72 74 | 20 63 6f 75 6e 74 2c 43 |rt,short| count,C|
|000015c0| 6f 6c 6f 72 53 70 65 63 | 20 2a 74 61 62 6c 65 29 |olorSpec| *table)|
|000015d0| 3b 0d 43 61 6c 6c 73 20 | 63 73 63 47 65 74 45 6e |;.Calls |cscGetEn|
|000015e0| 74 72 69 65 73 2e 20 54 | 68 69 73 20 69 73 20 6d |tries. T|his is m|
|000015f0| 75 63 68 20 61 73 20 79 | 6f 75 27 64 20 65 78 70 |uch as y|ou'd exp|
|00001600| 65 63 74 20 61 66 74 65 | 72 20 72 65 61 64 69 6e |ect afte|r readin|
|00001610| 67 20 47 44 53 65 74 45 | 6e 74 72 69 65 73 0d 62 |g GDSetE|ntries.b|
|00001620| 65 6c 6f 77 2c 20 45 58 | 43 45 50 54 20 74 68 61 |elow, EX|CEPT tha|
|00001630| 74 20 63 73 63 47 65 74 | 45 6e 74 72 69 65 73 20 |t cscGet|Entries |
|00001640| 77 72 69 74 65 73 20 69 | 6e 74 6f 20 74 61 62 6c |writes i|nto tabl|
|00001650| 65 5b 73 74 61 72 74 5d | 2c 2e 2e 2e 2e 20 0d 77 |e[start]|,.... .w|
|00001660| 68 65 72 65 61 73 20 63 | 73 63 53 65 74 45 6e 74 |hereas c|scSetEnt|
|00001670| 72 69 65 73 20 72 65 61 | 64 73 20 66 72 6f 6d 20 |ries rea|ds from |
|00001680| 74 61 62 6c 65 5b 30 5d | 2c 2e 2e 2e 2e 20 0d 4e |table[0]|,.... .N|
|00001690| 6f 74 65 20 74 68 61 74 | 20 75 6e 6c 65 73 73 20 |ote that| unless |
|000016a0| 74 68 65 20 67 61 6d 6d | 61 20 74 61 62 6c 65 20 |the gamm|a table |
|000016b0| 69 73 20 6c 69 6e 65 61 | 72 2c 20 74 68 65 20 76 |is linea|r, the v|
|000016c0| 61 6c 75 65 73 20 72 65 | 74 75 72 6e 65 64 20 6d |alues re|turned m|
|000016d0| 61 79 20 6e 6f 74 0d 62 | 65 20 74 68 65 20 73 61 |ay not.b|e the sa|
|000016e0| 6d 65 20 61 73 20 74 68 | 6f 73 65 20 6f 72 69 67 |me as th|ose orig|
|000016f0| 69 6e 61 6c 6c 79 20 70 | 61 73 73 65 64 20 62 79 |inally p|assed by|
|00001700| 20 47 44 53 65 74 45 6e | 74 72 69 65 73 2e 20 53 | GDSetEn|tries. S|
|00001710| 6f 20 63 61 6c 6c 0d 47 | 44 55 6e 63 6f 72 72 65 |o call.G|DUncorre|
|00001720| 63 74 65 64 47 61 6d 6d | 61 20 66 69 72 73 74 2e |ctedGamm|a first.|
|00001730| 20 54 72 79 20 74 68 65 | 20 64 65 6d 6f 20 54 69 | Try the| demo Ti|
|00001740| 6d 65 56 69 64 65 6f 2e | 0d 0d 4f 53 45 72 72 20 |meVideo.|..OSErr |
|00001750| 47 44 47 65 74 47 61 6d | 6d 61 28 47 44 48 61 6e |GDGetGam|ma(GDHan|
|00001760| 64 6c 65 20 64 65 76 69 | 63 65 2c 47 61 6d 6d 61 |dle devi|ce,Gamma|
|00001770| 54 62 6c 20 2a 2a 6d 79 | 47 61 6d 6d 61 54 62 6c |Tbl **my|GammaTbl|
|00001780| 48 61 6e 64 6c 65 29 3b | 0d 43 61 6c 6c 73 20 63 |Handle);|.Calls c|
|00001790| 73 63 47 65 74 47 61 6d | 6d 61 2e 20 52 65 74 75 |scGetGam|ma. Retu|
|000017a0| 72 6e 73 20 61 20 70 6f | 69 6e 74 65 72 20 74 6f |rns a po|inter to|
|000017b0| 20 74 68 65 20 47 61 6d | 6d 61 20 74 61 62 6c 65 | the Gam|ma table|
|000017c0| 20 69 6e 20 74 68 65 20 | 73 70 65 63 69 66 69 65 | in the |specifie|
|000017d0| 64 20 76 69 64 65 6f 0d | 64 65 76 69 63 65 2e 20 |d video.|device. |
|000017e0| 28 49 2e 65 2e 20 79 6f | 75 20 70 61 73 73 20 69 |(I.e. yo|u pass i|
|000017f0| 74 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 79 |t a poin|ter to y|
|00001800| 6f 75 72 20 70 6f 69 6e | 74 65 72 2c 20 61 20 68 |our poin|ter, a h|
|00001810| 61 6e 64 6c 65 2c 20 77 | 68 69 63 68 20 69 74 20 |andle, w|hich it |
|00001820| 75 73 65 73 20 74 6f 0d | 6c 6f 61 64 20 79 6f 75 |uses to.|load you|
|00001830| 72 20 70 6f 69 6e 74 65 | 72 2e 29 0d 0d 4f 53 45 |r pointe|r.)..OSE|
|00001840| 72 72 20 47 44 47 65 74 | 50 61 67 65 43 6e 74 28 |rr GDGet|PageCnt(|
|00001850| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|00001860| 73 68 6f 72 74 20 6d 6f | 64 65 2c 73 68 6f 72 74 |short mo|de,short|
|00001870| 20 2a 70 61 67 65 73 50 | 74 72 29 3b 0d 43 61 6c | *pagesP|tr);.Cal|
|00001880| 6c 73 20 63 73 63 47 65 | 74 50 61 67 65 43 6e 74 |ls cscGe|tPageCnt|
|00001890| 2e 20 43 61 6c 6c 65 64 | 20 22 47 65 74 50 61 67 |. Called| "GetPag|
|000018a0| 65 73 22 20 69 6e 20 44 | 65 73 69 67 6e 69 6e 67 |es" in D|esigning|
|000018b0| 20 43 61 72 64 73 20 61 | 6e 64 20 44 72 69 76 65 | Cards a|nd Drive|
|000018c0| 72 73 2c 20 33 72 64 20 | 45 64 2e 0d 59 6f 75 20 |rs, 3rd |Ed..You |
|000018d0| 74 65 6c 6c 20 69 74 20 | 77 68 69 63 68 20 6d 6f |tell it |which mo|
|000018e0| 64 65 20 79 6f 75 27 72 | 65 20 69 6e 74 65 72 65 |de you'r|e intere|
|000018f0| 73 74 65 64 20 69 6e 2e | 20 49 74 20 74 65 6c 6c |sted in.| It tell|
|00001900| 73 20 79 6f 75 20 68 6f | 77 20 6d 61 6e 79 20 70 |s you ho|w many p|
|00001910| 61 67 65 73 20 6f 66 0d | 76 69 64 65 6f 20 72 61 |ages of.|video ra|
|00001920| 6d 20 61 72 65 20 61 76 | 61 69 6c 61 62 6c 65 20 |m are av|ailable |
|00001930| 69 6e 20 74 68 61 74 20 | 6d 6f 64 65 2e 0d 0d 42 |in that |mode...B|
|00001940| 6f 6f 6c 65 61 6e 20 47 | 44 48 61 73 4d 6f 64 65 |oolean G|DHasMode|
|00001950| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00001960| 2c 73 68 6f 72 74 20 6d | 6f 64 65 2c 73 68 6f 72 |,short m|ode,shor|
|00001970| 74 20 2a 70 69 78 65 6c | 53 69 7a 65 50 74 72 2c |t *pixel|SizePtr,|
|00001980| 73 68 6f 72 74 20 2a 70 | 61 67 65 73 50 74 72 29 |short *p|agesPtr)|
|00001990| 3b 0d 52 65 74 75 72 6e | 73 20 30 20 69 66 20 6e |;.Return|s 0 if n|
|000019a0| 6f 20 73 75 63 68 20 76 | 69 64 65 6f 20 6d 6f 64 |o such v|ideo mod|
|000019b0| 65 2c 20 72 65 74 75 72 | 6e 73 20 31 20 69 66 20 |e, retur|ns 1 if |
|000019c0| 6d 6f 64 65 20 69 73 20 | 61 76 61 69 6c 61 62 6c |mode is |availabl|
|000019d0| 65 2e 0d 49 66 20 70 69 | 78 65 6c 53 69 7a 65 50 |e..If pi|xelSizeP|
|000019e0| 74 72 20 69 73 20 6e 6f | 74 20 4e 55 4c 4c 2c 20 |tr is no|t NULL, |
|000019f0| 74 68 65 6e 20 73 65 74 | 73 20 2a 70 69 78 65 6c |then set|s *pixel|
|00001a00| 53 69 7a 65 50 74 72 20 | 74 6f 20 70 69 78 65 6c |SizePtr |to pixel|
|00001a10| 53 69 7a 65 20 6f 72 20 | 2d 31 20 69 66 20 75 6e |Size or |-1 if un|
|00001a20| 6b 6e 6f 77 6e 2e 0d 49 | 66 20 70 61 67 65 73 50 |known..I|f pagesP|
|00001a30| 74 72 20 69 73 20 6e 6f | 74 20 4e 55 4c 4c 2c 20 |tr is no|t NULL, |
|00001a40| 74 68 65 6e 20 73 65 74 | 73 20 2a 70 61 67 65 73 |then set|s *pages|
|00001a50| 50 74 72 20 74 6f 20 70 | 61 67 65 73 2e 0d 0d 75 |Ptr to p|ages...u|
|00001a60| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 20 2a 47 44 |nsigned |char *GD|
|00001a70| 4e 61 6d 65 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |Name(GDH|andle de|
|00001a80| 76 69 63 65 29 3b 0d 52 | 65 74 75 72 6e 73 20 61 |vice);.R|eturns a|
|00001a90| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 | pointer| to the |
|00001aa0| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 64 72 69 76 |name of |the driv|
|00001ab0| 65 72 20 28 61 20 70 61 | 73 63 61 6c 20 73 74 72 |er (a pa|scal str|
|00001ac0| 69 6e 67 29 2e 20 54 68 | 69 73 20 69 73 20 71 75 |ing). Th|is is qu|
|00001ad0| 69 63 6b 2e 0d 54 68 65 | 20 73 74 72 69 6e 67 20 |ick..The| string |
|00001ae0| 69 73 20 70 61 72 74 20 | 6f 66 20 74 68 65 20 64 |is part |of the d|
|00001af0| 72 69 76 65 72 20 69 74 | 73 65 6c 66 2c 20 73 6f |river it|self, so|
|00001b00| 20 64 6f 6e 27 74 20 6d | 6f 64 69 66 79 20 69 74 | don't m|odify it|
|00001b10| 20 6f 72 20 74 72 79 20 | 74 6f 20 64 69 73 70 6f | or try |to dispo|
|00001b20| 73 65 20 6f 66 20 69 74 | 2e 0d 0d 75 6e 73 69 67 |se of it|...unsig|
|00001b30| 6e 65 64 20 63 68 61 72 | 20 2a 47 44 4e 61 6d 65 |ned char| *GDName|
|00001b40| 53 74 72 28 47 44 48 61 | 6e 64 6c 65 20 64 65 76 |Str(GDHa|ndle dev|
|00001b50| 69 63 65 29 3b 0d 52 65 | 74 75 72 6e 73 20 61 20 |ice);.Re|turns a |
|00001b60| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 65 20 6e |pointer |to the n|
|00001b70| 61 6d 65 20 6f 66 20 74 | 68 65 20 64 72 69 76 65 |ame of t|he drive|
|00001b80| 72 2c 20 61 73 20 61 20 | 43 20 73 74 72 69 6e 67 |r, as a |C string|
|00001b90| 2e 20 0d 54 68 65 20 73 | 74 72 69 6e 67 20 69 73 |. .The s|tring is|
|00001ba0| 20 73 74 61 74 69 63 2c | 20 61 6e 64 20 77 69 6c | static,| and wil|
|00001bb0| 6c 20 62 65 20 6f 76 65 | 72 77 72 69 74 74 65 6e |l be ove|rwritten|
|00001bc0| 20 62 79 20 74 68 65 20 | 6e 65 78 74 20 63 61 6c | by the |next cal|
|00001bd0| 6c 20 74 6f 20 47 44 4e | 61 6d 65 53 74 72 28 29 |l to GDN|ameStr()|
|00001be0| 2e 0d 0d 43 6f 6c 6f 72 | 53 70 65 63 20 2a 47 44 |...Color|Spec *GD|
|00001bf0| 4e 65 77 4c 69 6e 65 61 | 72 43 6f 6c 6f 72 54 61 |NewLinea|rColorTa|
|00001c00| 62 6c 65 28 47 44 48 61 | 6e 64 6c 65 20 64 65 76 |ble(GDHa|ndle dev|
|00001c10| 69 63 65 29 3b 0d 43 72 | 65 61 74 65 73 20 61 20 |ice);.Cr|eates a |
|00001c20| 64 65 66 61 75 6c 74 20 | 74 61 62 6c 65 20 66 6f |default |table fo|
|00001c30| 72 20 75 73 65 20 77 68 | 65 6e 20 67 64 54 79 70 |r use wh|en gdTyp|
|00001c40| 65 3d 3d 64 69 72 65 63 | 74 54 79 70 65 2e 0d 0d |e==direc|tType...|
|00001c50| 4f 53 45 72 72 20 47 44 | 50 72 69 6e 74 47 61 6d |OSErr GD|PrintGam|
|00001c60| 6d 61 54 61 62 6c 65 28 | 46 49 4c 45 20 2a 6f 2c |maTable(|FILE *o,|
|00001c70| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 29 |GDHandle| device)|
|00001c80| 3b 0d 0d 4f 53 45 72 72 | 20 47 44 52 65 73 74 6f |;..OSErr| GDResto|
|00001c90| 72 65 44 65 76 69 63 65 | 43 6c 75 74 28 47 44 48 |reDevice|Clut(GDH|
|00001ca0| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 29 3b 0d 4e |andle de|vice);.N|
|00001cb0| 6f 6d 69 6e 61 6c 6c 79 | 20 65 71 75 69 76 61 6c |ominally| equival|
|00001cc0| 65 6e 74 20 74 6f 20 41 | 70 70 6c 65 27 73 20 52 |ent to A|pple's R|
|00001cd0| 65 73 74 6f 72 65 44 65 | 76 69 63 65 43 6c 75 74 |estoreDe|viceClut|
|00001ce0| 28 29 2c 20 77 68 69 63 | 68 20 69 73 20 6f 6e 6c |(), whic|h is onl|
|00001cf0| 79 20 61 76 61 69 6c 61 | 62 6c 65 0d 73 69 6e 63 |y availa|ble.sinc|
|00001d00| 65 20 53 79 73 74 65 6d | 20 36 2e 30 35 2e 20 48 |e System| 6.05. H|
|00001d10| 6f 77 65 76 65 72 2c 20 | 49 20 66 69 6e 64 20 74 |owever, |I find t|
|00001d20| 68 61 74 20 41 70 70 6c | 65 27 73 20 72 6f 75 74 |hat Appl|e's rout|
|00001d30| 69 6e 65 20 73 6f 6d 65 | 74 69 6d 65 73 20 64 6f |ine some|times do|
|00001d40| 65 73 20 6e 6f 74 68 69 | 6e 67 2c 0d 77 68 65 72 |es nothi|ng,.wher|
|00001d50| 65 61 73 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |eas this| routine|
|00001d60| 20 61 6c 77 61 79 73 20 | 77 6f 72 6b 73 2e 20 50 | always |works. P|
|00001d70| 61 73 73 69 6e 67 20 61 | 20 4e 55 4c 4c 20 61 72 |assing a| NULL ar|
|00001d80| 67 75 6d 65 6e 74 20 63 | 61 75 73 65 73 20 72 65 |gument c|auses re|
|00001d90| 73 74 6f 72 61 74 69 6f | 6e 20 6f 66 0d 63 6c 75 |storatio|n of.clu|
|00001da0| 74 73 20 6f 66 20 61 6c | 6c 20 76 69 64 65 6f 20 |ts of al|l video |
|00001db0| 64 65 76 69 63 65 73 2e | 0d 0d 4f 53 45 72 72 20 |devices.|..OSErr |
|00001dc0| 47 44 53 61 76 65 47 61 | 6d 6d 61 28 47 44 48 61 |GDSaveGa|mma(GDHa|
|00001dd0| 6e 64 6c 65 20 64 65 76 | 69 63 65 29 3b 0d 4f 53 |ndle dev|ice);.OS|
|00001de0| 45 72 72 20 47 44 52 65 | 73 74 6f 72 65 47 61 6d |Err GDRe|storeGam|
|00001df0| 6d 61 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |ma(GDHan|dle devi|
|00001e00| 63 65 29 3b 0d 55 73 65 | 20 61 6e 20 69 6e 74 65 |ce);.Use| an inte|
|00001e10| 72 6e 61 6c 20 63 61 63 | 68 65 20 74 6f 20 73 61 |rnal cac|he to sa|
|00001e20| 76 65 20 61 6e 64 20 72 | 65 73 74 6f 72 65 20 74 |ve and r|estore t|
|00001e30| 68 65 20 64 65 76 69 63 | 65 27 73 20 67 61 6d 6d |he devic|e's gamm|
|00001e40| 61 2d 63 6f 72 72 65 63 | 74 69 6f 6e 20 74 61 62 |a-correc|tion tab|
|00001e50| 6c 65 2e 20 0d 47 44 53 | 61 76 65 47 61 6d 6d 61 |le. .GDS|aveGamma|
|00001e60| 28 4e 55 4c 4c 29 20 61 | 6e 64 20 47 44 52 65 73 |(NULL) a|nd GDRes|
|00001e70| 74 6f 72 65 47 61 6d 6d | 61 28 4e 55 4c 4c 29 20 |toreGamm|a(NULL) |
|00001e80| 73 61 76 65 20 61 6e 64 | 20 72 65 73 74 6f 72 65 |save and| restore|
|00001e90| 20 41 4c 4c 20 64 65 76 | 69 63 65 73 2e 0d 41 66 | ALL dev|ices..Af|
|00001ea0| 74 65 72 20 74 68 65 20 | 66 69 72 73 74 20 72 65 |ter the |first re|
|00001eb0| 71 75 65 73 74 2c 20 47 | 44 53 61 76 65 47 61 6d |quest, G|DSaveGam|
|00001ec0| 6d 61 28 29 20 69 67 6e | 6f 72 65 73 20 73 75 62 |ma() ign|ores sub|
|00001ed0| 73 65 71 75 65 6e 74 20 | 72 65 71 75 65 73 74 73 |sequent |requests|
|00001ee0| 20 74 6f 20 73 61 76 65 | 20 74 68 65 20 73 61 6d | to save| the sam|
|00001ef0| 65 20 0d 64 65 76 69 63 | 65 27 73 20 67 61 6d 6d |e .devic|e's gamm|
|00001f00| 61 20 74 61 62 6c 65 2e | 20 47 44 52 65 73 74 6f |a table.| GDResto|
|00001f10| 72 65 47 61 6d 6d 61 28 | 29 20 6e 6f 20 6c 6f 6e |reGamma(|) no lon|
|00001f20| 67 65 72 20 64 69 73 63 | 61 72 64 73 20 74 68 65 |ger disc|ards the|
|00001f30| 20 73 61 76 65 64 20 63 | 6f 70 79 20 28 74 68 65 | saved c|opy (the|
|00001f40| 20 63 61 63 68 65 29 2c | 20 73 6f 20 6d 75 6c 74 | cache),| so mult|
|00001f50| 69 70 6c 65 0d 63 61 6c | 6c 73 20 74 6f 20 47 44 |iple.cal|ls to GD|
|00001f60| 52 65 73 74 6f 72 65 47 | 61 6d 6d 61 28 29 20 77 |RestoreG|amma() w|
|00001f70| 69 6c 6c 20 61 6c 6c 20 | 62 65 20 65 66 66 65 63 |ill all |be effec|
|00001f80| 74 69 76 65 2e 20 59 6f | 75 20 73 68 6f 75 6c 64 |tive. Yo|u should|
|00001f90| 20 63 61 6c 6c 0d 47 44 | 52 65 73 74 6f 72 65 47 | call.GD|RestoreG|
|00001fa0| 61 6d 6d 61 20 62 65 66 | 6f 72 65 20 47 44 52 65 |amma bef|ore GDRe|
|00001fb0| 73 74 6f 72 65 44 65 76 | 69 63 65 43 6c 75 74 2c |storeDev|iceClut,|
|00001fc0| 20 62 65 63 61 75 73 65 | 20 74 68 65 20 76 69 64 | because| the vid|
|00001fd0| 65 6f 20 64 72 69 76 65 | 72 20 6d 65 72 65 6c 79 |eo drive|r merely|
|00001fe0| 20 73 61 76 65 73 20 74 | 68 65 20 67 61 6d 6d 61 | saves t|he gamma|
|00001ff0| 0d 74 61 62 6c 65 20 77 | 68 65 6e 20 79 6f 75 20 |.table w|hen you |
|00002000| 64 6f 20 61 20 63 73 63 | 53 65 74 47 61 6d 6d 61 |do a csc|SetGamma|
|00002010| 3b 20 74 68 65 20 64 72 | 69 76 65 72 20 61 63 74 |; the dr|iver act|
|00002020| 75 61 6c 6c 79 20 75 73 | 65 73 20 74 68 65 20 67 |ually us|es the g|
|00002030| 61 6d 6d 61 20 74 61 62 | 6c 65 20 74 6f 20 74 72 |amma tab|le to tr|
|00002040| 61 6e 73 66 6f 72 6d 0d | 61 20 6e 65 77 20 63 6c |ansform.|a new cl|
|00002050| 75 74 20 6f 6e 6c 79 20 | 77 68 65 6e 20 6c 6f 61 |ut only |when loa|
|00002060| 64 69 6e 67 20 74 68 65 | 20 63 6c 75 74 2e 0d 0d |ding the| clut...|
|00002070| 4f 53 45 72 72 20 47 44 | 53 65 74 45 6e 74 72 69 |OSErr GD|SetEntri|
|00002080| 65 73 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |es(GDHan|dle devi|
|00002090| 63 65 2c 73 68 6f 72 74 | 20 73 74 61 72 74 2c 73 |ce,short| start,s|
|000020a0| 68 6f 72 74 20 63 6f 75 | 6e 74 2c 43 6f 6c 6f 72 |hort cou|nt,Color|
|000020b0| 53 70 65 63 20 2a 74 61 | 62 6c 65 29 3b 0d 44 6f |Spec *ta|ble);.Do|
|000020c0| 65 73 20 61 20 63 73 63 | 53 65 74 45 6e 74 72 69 |es a csc|SetEntri|
|000020d0| 65 73 20 63 61 6c 6c 20 | 74 6f 20 74 68 65 20 76 |es call |to the v|
|000020e0| 69 64 65 6f 20 63 61 72 | 64 27 73 20 64 72 69 76 |ideo car|d's driv|
|000020f0| 65 72 2c 20 6c 6f 61 64 | 69 6e 67 20 61 6e 79 0d |er, load|ing any.|
|00002100| 6e 75 6d 62 65 72 20 6f | 66 20 63 6c 75 74 20 65 |number o|f clut e|
|00002110| 6e 74 72 69 65 73 20 77 | 69 74 68 20 61 72 62 69 |ntries w|ith arbi|
|00002120| 74 72 61 72 79 20 72 67 | 62 20 74 72 69 70 6c 65 |trary rg|b triple|
|00002130| 74 73 2e 20 28 4e 6f 74 | 65 20 74 68 61 74 20 74 |ts. (Not|e that t|
|00002140| 68 65 20 64 72 69 76 65 | 72 20 77 69 6c 6c 0d 74 |he drive|r will.t|
|00002150| 72 61 6e 73 66 6f 72 6d | 20 79 6f 75 72 20 72 67 |ransform| your rg|
|00002160| 62 20 74 72 69 70 6c 65 | 74 73 20 76 69 61 20 74 |b triple|ts via t|
|00002170| 68 65 20 67 61 6d 6d 61 | 20 74 61 62 6c 65 20 62 |he gamma| table b|
|00002180| 65 66 6f 72 65 20 6c 6f | 61 64 69 6e 67 20 74 68 |efore lo|ading th|
|00002190| 65 6d 20 69 6e 74 6f 20 | 74 68 65 0d 63 6c 75 74 |em into |the.clut|
|000021a0| 3b 20 73 6f 20 63 61 6c | 6c 20 47 44 55 6e 63 6f |; so cal|l GDUnco|
|000021b0| 72 72 65 63 74 65 64 47 | 61 6d 6d 61 20 66 69 72 |rrectedG|amma fir|
|000021c0| 73 74 2e 29 20 22 64 65 | 76 69 63 65 22 20 73 70 |st.) "de|vice" sp|
|000021d0| 65 63 69 66 69 65 73 20 | 77 68 69 63 68 20 76 69 |ecifies |which vi|
|000021e0| 64 65 6f 20 64 65 76 69 | 63 65 27 73 0d 63 6c 75 |deo devi|ce's.clu|
|000021f0| 74 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 6c 6f |t you wa|nt to lo|
|00002200| 61 64 2e 20 22 73 74 61 | 72 74 22 20 69 73 20 65 |ad. "sta|rt" is e|
|00002210| 69 74 68 65 72 20 69 6e | 20 74 68 65 20 72 61 6e |ither in| the ran|
|00002220| 67 65 20 30 20 74 6f 20 | 63 6c 75 74 53 69 7a 65 |ge 0 to |clutSize|
|00002230| 2d 31 2c 0d 69 6e 64 69 | 63 61 74 69 6e 67 20 77 |-1,.indi|cating w|
|00002240| 68 69 63 68 20 63 6c 75 | 74 20 65 6e 74 72 79 20 |hich clu|t entry |
|00002250| 74 6f 20 6c 6f 61 64 20 | 66 69 72 73 74 20 28 69 |to load |first (i|
|00002260| 6e 20 22 73 65 71 75 65 | 6e 63 65 20 6d 6f 64 65 |n "seque|nce mode|
|00002270| 22 29 2c 20 6f 72 20 69 | 73 20 2d 31 0d 28 72 65 |"), or i|s -1.(re|
|00002280| 71 75 65 73 74 69 6e 67 | 20 22 69 6e 64 65 78 20 |questing| "index |
|00002290| 6d 6f 64 65 22 29 2e 20 | 22 63 6f 75 6e 74 22 20 |mode"). |"count" |
|000022a0| 69 73 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |is the n|umber of|
|000022b0| 20 65 6e 74 72 69 65 73 | 20 74 6f 20 62 65 20 6d | entries| to be m|
|000022c0| 6f 64 69 66 69 65 64 2c | 0d 6d 69 6e 75 73 20 31 |odified,|.minus 1|
|000022d0| 2e 20 22 74 61 62 6c 65 | 22 20 69 73 20 61 20 43 |. "table|" is a C|
|000022e0| 6f 6c 6f 72 53 70 65 63 | 20 61 72 72 61 79 20 28 |olorSpec| array (|
|000022f0| 6e 6f 74 20 61 20 43 6f | 6c 6f 72 54 61 62 6c 65 |not a Co|lorTable|
|00002300| 29 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 74 68 65 |) contai|ning the|
|00002310| 20 72 67 62 0d 74 72 69 | 70 6c 65 74 73 20 74 68 | rgb.tri|plets th|
|00002320| 61 74 20 79 6f 75 20 77 | 61 6e 74 20 74 6f 20 6c |at you w|ant to l|
|00002330| 6f 61 64 20 69 6e 74 6f | 20 74 68 65 20 63 6c 75 |oad into| the clu|
|00002340| 74 2e 20 49 6e 20 73 65 | 71 75 65 6e 63 65 20 6d |t. In se|quence m|
|00002350| 6f 64 65 20 22 73 74 61 | 72 74 22 20 6d 75 73 74 |ode "sta|rt" must|
|00002360| 20 62 65 0d 69 6e 20 74 | 68 65 20 72 61 6e 67 65 | be.in t|he range|
|00002370| 20 30 20 74 6f 20 63 6c | 75 74 53 69 7a 65 2d 31 | 0 to cl|utSize-1|
|00002380| 2c 20 74 68 65 20 69 2d | 74 68 20 65 6c 65 6d 65 |, the i-|th eleme|
|00002390| 6e 74 20 6f 66 20 74 61 | 62 6c 65 20 63 6f 72 72 |nt of ta|ble corr|
|000023a0| 65 73 70 6f 6e 64 73 20 | 74 6f 20 74 68 65 0d 69 |esponds |to the.i|
|000023b0| 2d 74 68 20 65 6e 74 72 | 79 20 69 6e 20 74 68 65 |-th entr|y in the|
|000023c0| 20 63 6c 75 74 2c 20 61 | 6e 64 20 74 68 65 20 22 | clut, a|nd the "|
|000023d0| 76 61 6c 75 65 22 20 66 | 69 65 6c 64 20 6f 66 20 |value" f|ield of |
|000023e0| 65 61 63 68 20 65 6c 65 | 6d 65 6e 74 20 6f 66 20 |each ele|ment of |
|000023f0| 74 61 62 6c 65 20 69 73 | 0d 69 67 6e 6f 72 65 64 |table is|.ignored|
|00002400| 2e 20 49 6e 20 69 6e 64 | 65 78 20 6d 6f 64 65 20 |. In ind|ex mode |
|00002410| 22 73 74 61 72 74 22 20 | 6d 75 73 74 20 62 65 20 |"start" |must be |
|00002420| 2d 31 2c 20 61 6e 64 20 | 74 68 65 20 22 76 61 6c |-1, and |the "val|
|00002430| 75 65 22 20 66 69 65 6c | 64 20 6f 66 20 65 61 63 |ue" fiel|d of eac|
|00002440| 68 20 65 6c 65 6d 65 6e | 74 0d 6f 66 20 74 61 62 |h elemen|t.of tab|
|00002450| 6c 65 20 69 6e 64 69 63 | 61 74 65 73 20 77 68 69 |le indic|ates whi|
|00002460| 63 68 20 63 6c 75 74 20 | 65 6e 74 72 79 20 74 6f |ch clut |entry to|
|00002470| 20 6c 6f 61 64 20 69 74 | 20 69 6e 74 6f 2e 20 54 | load it| into. T|
|00002480| 68 65 20 61 72 67 75 6d | 65 6e 74 73 20 73 74 61 |he argum|ents sta|
|00002490| 72 74 2c 20 63 6f 75 6e | 74 2c 0d 61 6e 64 20 28 |rt, coun|t,.and (|
|000024a0| 70 65 72 68 61 70 73 29 | 20 74 61 62 6c 65 20 61 |perhaps)| table a|
|000024b0| 72 65 20 74 68 65 20 73 | 61 6d 65 20 61 73 20 66 |re the s|ame as f|
|000024c0| 6f 72 20 74 68 65 20 43 | 6f 6c 6f 72 20 4d 61 6e |or the C|olor Man|
|000024d0| 61 67 65 72 20 63 61 6c | 6c 20 53 65 74 45 6e 74 |ager cal|l SetEnt|
|000024e0| 72 69 65 73 28 29 2c 20 | 64 6f 63 75 6d 65 6e 74 |ries(), |document|
|000024f0| 65 64 20 69 6e 0d 49 6e | 73 69 64 65 20 4d 61 63 |ed in.In|side Mac|
|00002500| 69 6e 74 6f 73 68 20 56 | 2d 31 34 33 2e 20 4e 6f |intosh V|-143. No|
|00002510| 74 65 20 74 68 61 74 20 | 63 73 63 53 65 74 45 6e |te that |cscSetEn|
|00002520| 74 72 69 65 73 20 72 65 | 61 64 73 20 66 72 6f 6d |tries re|ads from|
|00002530| 20 74 61 62 6c 65 5b 30 | 5d 2c 2e 2e 2e 2e 20 0d | table[0|],.... .|
|00002540| 77 68 65 72 65 61 73 20 | 63 73 63 47 65 74 45 6e |whereas |cscGetEn|
|00002550| 74 72 69 65 73 20 77 72 | 69 74 65 73 20 74 6f 20 |tries wr|ites to |
|00002560| 74 61 62 6c 65 5b 73 74 | 61 72 74 5d 2c 2e 2e 2e |table[st|art],...|
|00002570| 2e 20 0d 28 4d 6f 73 74 | 20 64 72 69 76 65 72 73 |. .(Most| drivers|
|00002580| 20 77 61 69 74 20 66 6f | 72 20 62 6c 61 6e 6b 69 | wait fo|r blanki|
|00002590| 6e 67 20 62 65 66 6f 72 | 65 20 6d 6f 64 69 66 79 |ng befor|e modify|
|000025a0| 69 6e 67 20 74 68 65 0d | 63 6c 75 74 2e 20 46 6f |ing the.|clut. Fo|
|000025b0| 72 20 61 20 66 75 6c 6c | 20 64 69 73 63 75 73 73 |r a full| discuss|
|000025c0| 69 6f 6e 2c 20 72 65 61 | 64 20 74 68 65 20 56 69 |ion, rea|d the Vi|
|000025d0| 64 65 6f 54 6f 6f 6c 62 | 6f 78 20 22 56 69 64 65 |deoToolb|ox "Vide|
|000025e0| 6f 20 73 79 6e 63 68 22 | 20 66 69 6c 65 2e 29 20 |o synch"| file.) |
|000025f0| 59 6f 75 20 6d 61 79 0d | 61 6c 73 6f 20 77 61 6e |You may.|also wan|
|00002600| 74 20 74 6f 20 6c 6f 6f | 6b 20 61 74 20 74 68 65 |t to loo|k at the|
|00002610| 20 66 69 6c 65 20 53 65 | 74 45 6e 74 72 69 65 73 | file Se|tEntries|
|00002620| 51 75 69 63 6b 6c 79 2e | 63 2c 20 77 68 69 63 68 |Quickly.|c, which|
|00002630| 20 70 72 6f 76 69 64 65 | 73 20 74 68 65 0d 66 75 | provide|s the.fu|
|00002640| 6e 63 74 69 6f 6e 61 6c | 69 74 79 20 6f 66 20 47 |nctional|ity of G|
|00002650| 44 53 65 74 45 6e 74 72 | 69 65 73 20 61 6e 64 20 |DSetEntr|ies and |
|00002660| 47 44 44 69 72 65 63 74 | 53 65 74 45 6e 74 72 69 |GDDirect|SetEntri|
|00002670| 65 73 2c 20 62 75 74 20 | 62 79 70 61 73 73 65 73 |es, but |bypasses|
|00002680| 20 74 68 65 20 76 69 64 | 65 6f 0d 64 72 69 76 65 | the vid|eo.drive|
|00002690| 72 20 74 6f 20 61 63 63 | 65 73 73 20 74 68 65 20 |r to acc|ess the |
|000026a0| 68 61 72 64 77 61 72 65 | 20 64 69 72 65 63 74 6c |hardware| directl|
|000026b0| 79 2e 0d 0d 4f 53 45 72 | 72 20 47 44 53 65 74 45 |y...OSEr|r GDSetE|
|000026c0| 6e 74 72 69 65 73 42 79 | 54 79 70 65 28 47 44 48 |ntriesBy|Type(GDH|
|000026d0| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 2c 73 68 6f |andle de|vice,sho|
|000026e0| 72 74 20 73 74 61 72 74 | 2c 73 68 6f 72 74 20 63 |rt start|,short c|
|000026f0| 6f 75 6e 74 2c 43 6f 6c | 6f 72 53 70 65 63 20 2a |ount,Col|orSpec *|
|00002700| 74 61 62 6c 65 29 3b 0d | 43 68 65 63 6b 73 20 74 |table);.|Checks t|
|00002710| 68 65 20 28 2a 2a 64 65 | 76 69 63 65 29 2e 67 64 |he (**de|vice).gd|
|00002720| 54 79 70 65 20 66 69 65 | 6c 64 20 61 6e 64 20 63 |Type fie|ld and c|
|00002730| 61 6c 6c 73 20 63 73 63 | 53 65 74 45 6e 74 72 69 |alls csc|SetEntri|
|00002740| 65 73 2c 20 63 73 63 44 | 69 72 65 63 74 53 65 74 |es, cscD|irectSet|
|00002750| 45 6e 74 72 69 65 73 2c | 0d 6f 72 20 6e 6f 74 68 |Entries,|.or noth|
|00002760| 69 6e 67 2c 20 61 73 20 | 61 70 70 72 6f 70 72 69 |ing, as |appropri|
|00002770| 61 74 65 2e 0d 0d 4f 53 | 45 72 72 20 47 44 53 65 |ate...OS|Err GDSe|
|00002780| 74 45 6e 74 72 69 65 73 | 42 79 54 79 70 65 48 69 |tEntries|ByTypeHi|
|00002790| 67 68 50 72 69 6f 72 69 | 74 79 28 47 44 48 61 6e |ghPriori|ty(GDHan|
|000027a0| 64 6c 65 20 64 65 76 69 | 63 65 2c 73 68 6f 72 74 |dle devi|ce,short|
|000027b0| 20 73 74 61 72 74 2c 73 | 68 6f 72 74 20 63 6f 75 | start,s|hort cou|
|000027c0| 6e 74 0d 09 2c 43 6f 6c | 6f 72 53 70 65 63 20 2a |nt..,Col|orSpec *|
|000027d0| 74 61 62 6c 65 29 3b 0d | 43 61 6c 6c 73 20 47 44 |table);.|Calls GD|
|000027e0| 53 65 74 45 6e 74 72 69 | 65 73 42 79 54 79 70 65 |SetEntri|esByType|
|000027f0| 28 29 20 77 68 69 6c 65 | 20 74 68 65 20 70 72 6f |() while| the pro|
|00002800| 63 65 73 73 6f 72 20 70 | 72 69 6f 72 69 74 79 20 |cessor p|riority |
|00002810| 68 61 73 20 62 65 65 6e | 20 74 65 6d 70 6f 72 61 |has been| tempora|
|00002820| 72 69 6c 79 20 0d 72 61 | 69 73 65 64 20 74 6f 20 |rily .ra|ised to |
|00002830| 37 2e 0d 0d 4f 53 45 72 | 72 20 47 44 53 65 74 47 |7...OSEr|r GDSetG|
|00002840| 61 6d 6d 61 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |amma(GDH|andle de|
|00002850| 76 69 63 65 2c 20 47 61 | 6d 6d 61 54 62 6c 20 2a |vice, Ga|mmaTbl *|
|00002860| 67 61 6d 6d 61 29 3b 0d | 43 61 6c 6c 73 20 63 73 |gamma);.|Calls cs|
|00002870| 63 53 65 74 47 61 6d 6d | 61 2e 20 4c 6f 61 64 73 |cSetGamm|a. Loads|
|00002880| 20 61 20 47 61 6d 6d 61 | 20 74 61 62 6c 65 20 69 | a Gamma| table i|
|00002890| 6e 74 6f 20 74 68 65 20 | 73 70 65 63 69 66 69 65 |nto the |specifie|
|000028a0| 64 20 76 69 64 65 6f 20 | 64 65 76 69 63 65 2e 20 |d video |device. |
|000028b0| 54 68 65 0d 76 69 64 65 | 6f 20 64 72 69 76 65 72 |The.vide|o driver|
|000028c0| 20 77 69 6c 6c 20 6d 61 | 6b 65 20 61 20 63 6f 70 | will ma|ke a cop|
|000028d0| 79 20 6f 66 20 79 6f 75 | 72 20 74 61 62 6c 65 2e |y of you|r table.|
|000028e0| 20 59 6f 75 20 63 61 6e | 20 64 69 73 63 61 72 64 | You can| discard|
|000028f0| 20 79 6f 75 72 20 74 61 | 62 6c 65 20 61 66 74 65 | your ta|ble afte|
|00002900| 72 0d 6d 61 6b 69 6e 67 | 20 74 68 69 73 20 63 61 |r.making| this ca|
|00002910| 6c 6c 2e 20 4e 6f 74 65 | 20 74 68 61 74 20 74 68 |ll. Note| that th|
|00002920| 65 20 76 69 64 65 6f 20 | 64 72 69 76 65 72 20 6f |e video |driver o|
|00002930| 6e 6c 79 20 75 73 65 73 | 20 74 68 65 20 67 61 6d |nly uses| the gam|
|00002940| 6d 61 20 74 61 62 6c 65 | 20 77 68 65 6e 0d 70 65 |ma table| when.pe|
|00002950| 72 66 6f 72 6d 69 6e 67 | 20 63 73 63 53 65 74 45 |rforming| cscSetE|
|00002960| 6e 74 72 69 65 73 2c 20 | 69 2e 65 2e 20 77 68 65 |ntries, |i.e. whe|
|00002970| 6e 20 61 63 74 75 61 6c | 6c 79 20 6c 6f 61 64 69 |n actual|ly loadi|
|00002980| 6e 67 20 74 68 65 20 63 | 6c 75 74 2e 20 54 68 65 |ng the c|lut. The|
|00002990| 20 73 74 72 75 63 74 75 | 72 65 20 6f 66 20 74 68 | structu|re of th|
|000029a0| 65 0d 67 61 6d 6d 61 20 | 74 61 62 6c 65 20 69 73 |e.gamma |table is|
|000029b0| 20 28 66 69 6e 61 6c 6c | 79 21 29 20 64 6f 63 75 | (finall|y!) docu|
|000029c0| 6d 65 6e 74 65 64 20 69 | 6e 20 44 65 73 69 67 6e |mented i|n Design|
|000029d0| 69 6e 67 20 43 61 72 64 | 73 20 61 6e 64 20 44 72 |ing Card|s and Dr|
|000029e0| 69 76 65 72 73 2c 20 33 | 72 64 0d 65 64 69 74 69 |ivers, 3|rd.editi|
|000029f0| 6f 6e 2c 20 70 61 67 65 | 73 20 32 31 35 2d 32 31 |on, page|s 215-21|
|00002a00| 36 2e 20 42 65 77 61 72 | 65 20 6f 66 20 61 20 64 |6. Bewar|e of a d|
|00002a10| 69 73 63 72 65 70 61 6e | 63 79 20 62 65 74 77 65 |iscrepan|cy betwe|
|00002a20| 65 6e 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 61 |en the d|ocumenta|
|00002a30| 74 69 6f 6e 20 61 6e 64 | 0d 74 68 65 20 64 65 66 |tion and|.the def|
|00002a40| 69 6e 69 74 69 6f 6e 20 | 69 6e 20 51 75 69 63 6b |inition |in Quick|
|00002a50| 44 72 61 77 2e 68 3a 20 | 67 46 6f 72 6d 75 6c 61 |Draw.h: |gFormula|
|00002a60| 44 61 74 61 20 69 73 20 | 64 65 73 63 72 69 62 65 |Data is |describe|
|00002a70| 64 20 61 73 20 61 20 62 | 79 74 65 20 61 72 72 61 |d as a b|yte arra|
|00002a80| 79 20 69 6e 20 74 68 65 | 0d 74 65 78 74 2c 20 62 |y in the|.text, b|
|00002a90| 75 74 20 69 73 20 64 65 | 63 6c 61 72 65 64 20 61 |ut is de|clared a|
|00002aa0| 73 20 61 20 73 68 6f 72 | 74 20 61 72 72 61 79 20 |s a shor|t array |
|00002ab0| 69 6e 20 74 68 65 20 51 | 75 69 63 6b 44 72 61 77 |in the Q|uickDraw|
|00002ac0| 2e 68 20 68 65 61 64 65 | 72 20 66 69 6c 65 2e 20 |.h heade|r file. |
|00002ad0| 4e 4f 54 45 3a 20 61 0d | 66 65 77 20 76 69 64 65 |NOTE: a.|few vide|
|00002ae0| 6f 20 64 72 69 76 65 72 | 73 20 28 52 61 64 69 75 |o driver|s (Radiu|
|00002af0| 73 20 50 6f 77 65 72 56 | 69 65 77 20 61 6e 64 20 |s PowerV|iew and |
|00002b00| 53 75 70 65 72 4d 61 63 | 20 43 6f 6c 6f 72 43 61 |SuperMac| ColorCa|
|00002b10| 72 64 29 20 64 6f 20 6e | 6f 74 20 73 75 70 70 6f |rd) do n|ot suppo|
|00002b20| 72 74 20 67 61 6d 6d 61 | 0d 74 61 62 6c 65 73 2e |rt gamma|.tables.|
|00002b30| 20 54 68 65 20 53 75 70 | 65 72 4d 61 63 20 43 6f | The Sup|erMac Co|
|00002b40| 6c 6f 72 43 61 72 64 20 | 69 73 20 77 65 6c 6c 20 |lorCard |is well |
|00002b50| 62 65 68 61 76 65 64 2c | 20 67 69 76 69 6e 67 20 |behaved,| giving |
|00002b60| 74 68 65 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 |the appr|opriate |
|00002b70| 65 72 72 6f 72 0d 63 6f | 64 65 2c 20 72 65 74 75 |error.co|de, retu|
|00002b80| 72 6e 65 64 20 62 79 20 | 47 44 53 65 74 47 61 6d |rned by |GDSetGam|
|00002b90| 6d 61 20 61 6e 64 20 47 | 44 47 65 74 47 61 6d 6d |ma and G|DGetGamm|
|00002ba0| 61 2e 20 54 68 65 20 52 | 61 64 69 75 73 20 50 6f |a. The R|adius Po|
|00002bb0| 77 65 72 56 69 65 77 20 | 72 65 70 6f 72 74 73 20 |werView |reports |
|00002bc0| 6e 6f 0d 65 72 72 6f 72 | 20 79 65 74 20 69 67 6e |no.error| yet ign|
|00002bd0| 6f 72 65 73 20 74 68 65 | 20 47 44 53 65 74 47 61 |ores the| GDSetGa|
|00002be0| 6d 6d 61 20 63 61 6c 6c | 20 61 6e 64 20 72 65 74 |mma call| and ret|
|00002bf0| 75 72 6e 73 20 61 20 74 | 61 62 6c 65 20 66 75 6c |urns a t|able ful|
|00002c00| 6c 20 6f 66 20 7a 65 72 | 6f 65 73 20 69 6e 0d 72 |l of zer|oes in.r|
|00002c10| 65 73 70 6f 6e 73 65 20 | 74 6f 20 47 44 47 65 74 |esponse |to GDGet|
|00002c20| 47 61 6d 6d 61 2e 20 53 | 65 65 20 4e 4f 54 45 20 |Gamma. S|ee NOTE |
|00002c30| 66 72 6f 6d 20 54 6f 6d | 20 42 75 73 65 79 20 62 |from Tom| Busey b|
|00002c40| 65 6c 6f 77 2e 20 48 6f | 77 65 76 65 72 2c 20 69 |elow. Ho|wever, i|
|00002c50| 66 20 61 6c 6c 20 79 6f | 75 20 77 61 6e 74 0d 74 |f all yo|u want.t|
|00002c60| 6f 20 64 6f 20 69 73 20 | 63 61 6c 6c 20 47 44 55 |o do is |call GDU|
|00002c70| 6e 63 6f 72 72 65 63 74 | 65 64 47 61 6d 6d 61 2c |ncorrect|edGamma,|
|00002c80| 20 74 68 65 6e 20 74 68 | 65 73 65 20 6c 69 6d 69 | then th|ese limi|
|00002c90| 74 61 74 69 6f 6e 73 20 | 77 6f 6e 27 74 20 61 66 |tations |won't af|
|00002ca0| 66 65 63 74 20 79 6f 75 | 2c 0d 62 65 63 61 75 73 |fect you|,.becaus|
|00002cb0| 65 20 74 68 65 20 64 72 | 69 76 65 72 73 20 74 68 |e the dr|ivers th|
|00002cc0| 61 74 20 6c 61 63 6b 20 | 67 61 6d 6d 61 20 74 61 |at lack |gamma ta|
|00002cd0| 62 6c 65 73 20 61 6c 77 | 61 79 73 20 67 69 76 65 |bles alw|ays give|
|00002ce0| 20 79 6f 75 20 70 72 65 | 63 69 73 65 6c 79 20 74 | you pre|cisely t|
|00002cf0| 68 65 0d 62 65 68 61 76 | 69 6f 72 20 74 68 61 74 |he.behav|ior that|
|00002d00| 20 6f 6e 65 20 72 65 71 | 75 65 73 74 73 20 62 79 | one req|uests by|
|00002d10| 20 63 61 6c 6c 69 6e 67 | 20 47 44 55 6e 63 6f 72 | calling| GDUncor|
|00002d20| 72 65 63 74 65 64 47 61 | 6d 6d 61 2e 0d 0d 4f 53 |rectedGa|mma...OS|
|00002d30| 45 72 72 20 47 44 53 65 | 74 50 61 67 65 44 72 61 |Err GDSe|tPageDra|
|00002d40| 77 6e 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |wn(GDHan|dle devi|
|00002d50| 63 65 2c 73 68 6f 72 74 | 20 70 61 67 65 29 3b 0d |ce,short| page);.|
|00002d60| 43 68 6f 6f 73 65 20 77 | 68 69 63 68 20 70 61 67 |Choose w|hich pag|
|00002d70| 65 20 6f 66 20 76 69 64 | 65 6f 20 6d 65 6d 6f 72 |e of vid|eo memor|
|00002d80| 79 20 77 69 6c 6c 20 62 | 65 20 75 73 65 64 20 62 |y will b|e used b|
|00002d90| 79 20 66 75 74 75 72 65 | 20 64 72 61 77 69 6e 67 |y future| drawing|
|00002da0| 20 6f 70 65 72 61 74 69 | 6f 6e 73 2e 20 0d 55 6e | operati|ons. .Un|
|00002db0| 74 65 73 74 65 64 2e 0d | 0d 4f 53 45 72 72 20 47 |tested..|.OSErr G|
|00002dc0| 44 53 65 74 50 61 67 65 | 53 68 6f 77 6e 28 47 44 |DSetPage|Shown(GD|
|00002dd0| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 2c 73 68 |Handle d|evice,sh|
|00002de0| 6f 72 74 20 70 61 67 65 | 29 3b 0d 43 68 6f 6f 73 |ort page|);.Choos|
|00002df0| 65 20 77 68 69 63 68 20 | 70 61 67 65 20 6f 66 20 |e which |page of |
|00002e00| 76 69 64 65 6f 20 6d 65 | 6d 6f 72 79 20 77 65 20 |video me|mory we |
|00002e10| 73 65 65 2e 20 55 6e 74 | 65 73 74 65 64 2e 0d 0d |see. Unt|ested...|
|00002e20| 4f 53 45 72 72 20 47 44 | 55 6e 63 6f 72 72 65 63 |OSErr GD|Uncorrec|
|00002e30| 74 65 64 47 61 6d 6d 61 | 28 47 44 48 61 6e 64 6c |tedGamma|(GDHandl|
|00002e40| 65 20 64 65 76 69 63 65 | 29 3b 0d 41 73 6b 73 20 |e device|);.Asks |
|00002e50| 47 44 53 65 74 47 61 6d | 6d 61 20 74 6f 20 6c 6f |GDSetGam|ma to lo|
|00002e60| 61 64 20 61 20 6c 69 6e | 65 61 72 20 67 61 6d 6d |ad a lin|ear gamm|
|00002e70| 61 20 74 61 62 6c 65 2c | 20 69 2e 65 2e 20 6e 6f |a table,| i.e. no|
|00002e80| 20 63 6f 72 72 65 63 74 | 69 6f 6e 2e 20 28 54 68 | correct|ion. (Th|
|00002e90| 65 20 67 61 6d 6d 61 0d | 63 6f 72 72 65 63 74 69 |e gamma.|correcti|
|00002ea0| 6f 6e 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 62 |on imple|mented b|
|00002eb0| 79 20 74 61 62 6c 65 2d | 6c 6f 6f 6b 75 70 20 69 |y table-|lookup i|
|00002ec0| 6e 20 74 68 65 20 76 69 | 64 65 6f 20 64 72 69 76 |n the vi|deo driv|
|00002ed0| 65 72 20 69 73 20 74 6f | 6f 20 63 72 75 64 65 20 |er is to|o crude |
|00002ee0| 66 6f 72 0d 65 78 70 65 | 72 69 6d 65 6e 74 73 20 |for.expe|riments |
|00002ef0| 74 68 61 74 20 77 61 6e | 74 20 61 63 63 75 72 61 |that wan|t accura|
|00002f00| 74 65 20 6c 75 6d 69 6e | 61 6e 63 65 20 63 6f 6e |te lumin|ance con|
|00002f10| 74 72 6f 6c 2e 29 0d 0d | 69 6e 74 20 47 44 56 65 |trol.)..|int GDVe|
|00002f20| 72 73 69 6f 6e 28 47 44 | 48 61 6e 64 6c 65 20 64 |rsion(GD|Handle d|
|00002f30| 65 76 69 63 65 29 0d 52 | 65 74 75 72 6e 73 20 74 |evice).R|eturns t|
|00002f40| 68 65 20 76 65 72 73 69 | 6f 6e 20 6e 75 6d 62 65 |he versi|on numbe|
|00002f50| 72 20 6f 66 20 74 68 65 | 20 64 72 69 76 65 72 2e |r of the| driver.|
|00002f60| 20 46 72 6f 6d 20 74 68 | 65 20 66 69 72 73 74 20 | From th|e first |
|00002f70| 77 6f 72 64 2d 61 6c 69 | 67 6e 65 64 20 77 6f 72 |word-ali|gned wor|
|00002f80| 64 20 61 66 74 65 72 0d | 74 68 65 20 6e 61 6d 65 |d after.|the name|
|00002f90| 20 73 74 72 69 6e 67 2e | 20 54 68 69 73 20 69 73 | string.| This is|
|00002fa0| 20 71 75 69 63 6b 2e 0d | 0d 4f 53 45 72 72 20 47 | quick..|.OSErr G|
|00002fb0| 44 47 65 74 4e 65 78 74 | 52 65 73 6f 6c 75 74 69 |DGetNext|Resoluti|
|00002fc0| 6f 6e 28 29 0d 49 6d 70 | 6c 65 6d 65 6e 74 73 20 |on().Imp|lements |
|00002fd0| 63 73 63 47 65 74 4e 65 | 78 74 52 65 73 6f 6c 75 |cscGetNe|xtResolu|
|00002fe0| 74 69 6f 6e 2e 0d 0d 4c | 45 53 53 2d 55 53 45 46 |tion...L|ESS-USEF|
|00002ff0| 55 4c 20 28 4c 4f 57 20 | 4c 45 56 45 4c 29 20 52 |UL (LOW |LEVEL) R|
|00003000| 4f 55 54 49 4e 45 53 3a | 0d 0d 4f 53 45 72 72 20 |OUTINES:|..OSErr |
|00003010| 47 44 43 6f 6e 74 72 6f | 6c 28 69 6e 74 20 72 65 |GDContro|l(int re|
|00003020| 66 4e 75 6d 2c 69 6e 74 | 20 63 73 43 6f 64 65 2c |fNum,int| csCode,|
|00003030| 50 74 72 20 63 73 50 61 | 72 61 6d 50 74 72 29 0d |Ptr csPa|ramPtr).|
|00003040| 55 73 65 73 20 6c 6f 77 | 2d 6c 65 76 65 6c 20 50 |Uses low|-level P|
|00003050| 42 43 6f 6e 74 72 6f 6c | 28 29 20 63 61 6c 6c 20 |BControl|() call |
|00003060| 74 6f 20 69 6d 70 6c 65 | 6d 65 6e 74 20 61 20 22 |to imple|ment a "|
|00003070| 43 6f 6e 74 72 6f 6c 28 | 29 22 20 63 61 6c 6c 20 |Control(|)" call |
|00003080| 74 68 61 74 20 77 6f 72 | 6b 73 21 20 0d 49 20 64 |that wor|ks! .I d|
|00003090| 6f 6e 27 74 20 6b 6e 6f | 77 20 77 68 79 20 74 68 |on't kno|w why th|
|000030a0| 69 73 20 77 61 73 6e 27 | 74 20 64 69 73 63 75 73 |is wasn'|t discus|
|000030b0| 73 65 64 20 69 6e 20 41 | 70 70 6c 65 20 54 65 63 |sed in A|pple Tec|
|000030c0| 68 20 4e 6f 74 65 20 32 | 36 32 2e 0d 0d 4f 53 45 |h Note 2|62...OSE|
|000030d0| 72 72 20 47 44 44 69 72 | 65 63 74 53 65 74 45 6e |rr GDDir|ectSetEn|
|000030e0| 74 72 69 65 73 28 47 44 | 48 61 6e 64 6c 65 20 64 |tries(GD|Handle d|
|000030f0| 65 76 69 63 65 2c 73 68 | 6f 72 74 20 73 74 61 72 |evice,sh|ort star|
|00003100| 74 2c 73 68 6f 72 74 20 | 63 6f 75 6e 74 2c 43 6f |t,short |count,Co|
|00003110| 6c 6f 72 53 70 65 63 20 | 2a 74 61 62 6c 65 29 3b |lorSpec |*table);|
|00003120| 0d 43 61 6c 6c 73 20 63 | 73 63 44 69 72 65 63 74 |.Calls c|scDirect|
|00003130| 53 65 74 45 6e 74 72 69 | 65 73 2e 20 49 66 20 79 |SetEntri|es. If y|
|00003140| 6f 75 72 20 70 69 78 65 | 6c 20 64 65 70 74 68 20 |our pixe|l depth |
|00003150| 69 73 20 3e 38 20 74 68 | 65 6e 20 74 68 65 20 63 |is >8 th|en the c|
|00003160| 73 63 53 65 74 45 6e 74 | 72 69 65 73 20 63 61 6c |scSetEnt|ries cal|
|00003170| 6c 20 69 73 0d 64 69 73 | 61 62 6c 65 64 2c 20 61 |l is.dis|abled, a|
|00003180| 6e 64 20 79 6f 75 20 6d | 75 73 74 20 75 73 65 20 |nd you m|ust use |
|00003190| 74 68 69 73 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |this ins|tead of |
|000031a0| 47 44 53 65 74 45 6e 74 | 72 69 65 73 28 29 2e 0d |GDSetEnt|ries()..|
|000031b0| 0d 56 69 64 65 6f 44 72 | 69 76 65 72 20 2a 47 44 |.VideoDr|iver *GD|
|000031c0| 44 72 69 76 65 72 41 64 | 64 72 65 73 73 28 47 44 |DriverAd|dress(GD|
|000031d0| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 29 3b 0d |Handle d|evice);.|
|000031e0| 52 65 74 75 72 6e 73 20 | 61 20 70 6f 69 6e 74 65 |Returns |a pointe|
|000031f0| 72 20 74 6f 20 74 68 65 | 20 64 72 69 76 65 72 2c |r to the| driver,|
|00003200| 20 77 68 65 74 68 65 72 | 20 69 6e 20 52 4f 4d 20 | whether| in ROM |
|00003210| 6f 72 20 52 41 4d 2e 20 | 4e 65 69 74 68 65 72 20 |or RAM. |Neither |
|00003220| 74 68 69 73 20 70 72 6f | 74 6f 74 79 70 65 0d 6e |this pro|totype.n|
|00003230| 6f 72 20 74 68 65 20 64 | 65 66 69 6e 69 74 69 6f |or the d|efinitio|
|00003240| 6e 20 6f 66 20 74 68 65 | 20 56 69 64 65 6f 44 72 |n of the| VideoDr|
|00003250| 69 76 65 72 20 73 74 72 | 75 63 74 75 72 65 20 61 |iver str|ucture a|
|00003260| 72 65 20 69 6e 63 6c 75 | 64 65 64 20 69 6e 20 56 |re inclu|ded in V|
|00003270| 69 64 65 6f 54 6f 6f 6c | 62 6f 78 2e 68 2e 0d 0d |ideoTool|box.h...|
|00003280| 4f 53 45 72 72 20 47 44 | 47 65 74 44 65 66 61 75 |OSErr GD|GetDefau|
|00003290| 6c 74 4d 6f 64 65 28 47 | 44 48 61 6e 64 6c 65 20 |ltMode(G|DHandle |
|000032a0| 64 65 76 69 63 65 2c 73 | 68 6f 72 74 20 2a 6d 6f |device,s|hort *mo|
|000032b0| 64 65 50 74 72 29 0d 43 | 61 6c 6c 73 20 63 73 63 |dePtr).C|alls csc|
|000032c0| 47 65 74 44 65 66 61 75 | 6c 74 4d 6f 64 65 2e 20 |GetDefau|ltMode. |
|000032d0| 49 74 20 74 65 6c 6c 73 | 20 79 6f 75 20 77 68 61 |It tells| you wha|
|000032e0| 74 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 6d 6f |t the de|fault mo|
|000032f0| 64 65 20 69 73 2e 20 49 | 27 6d 20 6e 6f 74 20 73 |de is. I|'m not s|
|00003300| 75 72 65 0d 77 68 61 74 | 20 74 68 69 73 20 6d 65 |ure.what| this me|
|00003310| 61 6e 73 2e 0d 0d 4f 53 | 45 72 72 20 47 44 47 65 |ans...OS|Err GDGe|
|00003320| 74 47 72 61 79 28 47 44 | 48 61 6e 64 6c 65 20 64 |tGray(GD|Handle d|
|00003330| 65 76 69 63 65 2c 42 6f | 6f 6c 65 61 6e 20 2a 66 |evice,Bo|olean *f|
|00003340| 6c 61 67 50 74 72 29 3b | 0d 43 61 6c 6c 73 20 63 |lagPtr);|.Calls c|
|00003350| 73 63 47 65 74 47 72 61 | 79 2e 20 47 65 74 20 67 |scGetGra|y. Get g|
|00003360| 72 61 79 20 66 6c 61 67 | 2e 20 30 20 66 6f 72 20 |ray flag|. 0 for |
|00003370| 63 6f 6c 6f 72 2e 20 31 | 20 69 66 20 61 6c 6c 20 |color. 1| if all |
|00003380| 63 6f 6c 6f 72 73 20 6d | 61 70 70 65 64 20 74 6f |colors m|apped to|
|00003390| 0d 6c 75 6d 69 6e 61 6e | 63 65 2d 65 71 75 69 76 |.luminan|ce-equiv|
|000033a0| 61 6c 65 6e 74 20 67 72 | 61 79 20 74 6f 6e 65 73 |alent gr|ay tones|
|000033b0| 2e 0d 0d 4f 53 45 72 72 | 20 47 44 47 65 74 49 6e |...OSErr| GDGetIn|
|000033c0| 74 65 72 72 75 70 74 28 | 47 44 48 61 6e 64 6c 65 |terrupt(|GDHandle|
|000033d0| 20 64 65 76 69 63 65 2c | 42 6f 6f 6c 65 61 6e 20 | device,|Boolean |
|000033e0| 2a 66 6c 61 67 50 74 72 | 29 3b 0d 43 61 6c 6c 73 |*flagPtr|);.Calls|
|000033f0| 20 63 73 63 47 65 74 49 | 6e 74 65 72 72 75 70 74 | cscGetI|nterrupt|
|00003400| 2e 20 47 65 74 20 66 6c | 61 67 2e 20 31 20 69 66 |. Get fl|ag. 1 if|
|00003410| 20 56 42 4c 20 69 6e 74 | 65 72 72 75 70 74 73 20 | VBL int|errupts |
|00003420| 6f 66 20 74 68 69 73 20 | 63 61 72 64 20 61 72 65 |of this |card are|
|00003430| 20 65 6e 61 62 6c 65 64 | 2e 20 30 0d 69 66 20 64 | enabled|. 0.if d|
|00003440| 69 73 61 62 6c 65 64 2e | 0d 0d 4f 53 45 72 72 20 |isabled.|..OSErr |
|00003450| 47 44 47 65 74 4d 6f 64 | 65 28 47 44 48 61 6e 64 |GDGetMod|e(GDHand|
|00003460| 6c 65 20 64 65 76 69 63 | 65 2c 73 68 6f 72 74 20 |le devic|e,short |
|00003470| 2a 6d 6f 64 65 50 74 72 | 2c 73 68 6f 72 74 20 2a |*modePtr|,short *|
|00003480| 70 61 67 65 50 74 72 2c | 50 74 72 20 2a 62 61 73 |pagePtr,|Ptr *bas|
|00003490| 65 41 64 64 72 50 74 72 | 29 3b 0d 43 61 6c 6c 73 |eAddrPtr|);.Calls|
|000034a0| 20 63 73 63 47 65 74 4d | 6f 64 65 2e 20 49 74 20 | cscGetM|ode. It |
|000034b0| 74 65 6c 6c 73 20 79 6f | 75 20 74 68 65 20 63 75 |tells yo|u the cu|
|000034c0| 72 72 65 6e 74 20 6d 6f | 64 65 2c 20 70 61 67 65 |rrent mo|de, page|
|000034d0| 20 6f 66 20 76 69 64 65 | 6f 20 6d 65 6d 6f 72 79 | of vide|o memory|
|000034e0| 2c 20 61 6e 64 20 74 68 | 65 0d 62 61 73 65 20 61 |, and th|e.base a|
|000034f0| 64 64 72 65 73 73 20 6f | 66 20 74 68 61 74 20 70 |ddress o|f that p|
|00003500| 61 67 65 2e 0d 0d 4f 53 | 45 72 72 20 47 44 47 65 |age...OS|Err GDGe|
|00003510| 74 50 61 67 65 42 61 73 | 65 28 47 44 48 61 6e 64 |tPageBas|e(GDHand|
|00003520| 6c 65 20 64 65 76 69 63 | 65 2c 73 68 6f 72 74 20 |le devic|e,short |
|00003530| 70 61 67 65 2c 50 74 72 | 20 2a 62 61 73 65 41 64 |page,Ptr| *baseAd|
|00003540| 64 72 50 74 72 29 3b 0d | 43 61 6c 6c 73 20 63 73 |drPtr);.|Calls cs|
|00003550| 63 47 65 74 50 61 67 65 | 42 61 73 65 2e 20 28 43 |cGetPage|Base. (C|
|00003560| 61 6c 6c 65 64 20 22 63 | 73 63 47 65 74 42 61 73 |alled "c|scGetBas|
|00003570| 65 41 64 64 72 22 20 69 | 6e 20 44 65 73 69 67 6e |eAddr" i|n Design|
|00003580| 69 6e 67 20 43 61 72 64 | 73 20 61 6e 64 20 44 72 |ing Card|s and Dr|
|00003590| 69 76 65 72 73 2c 20 33 | 72 64 0d 45 64 2e 29 20 |ivers, 3|rd.Ed.) |
|000035a0| 59 6f 75 20 74 65 6c 6c | 20 69 74 20 77 68 69 63 |You tell| it whic|
|000035b0| 68 20 70 61 67 65 20 6f | 66 20 76 69 64 65 6f 20 |h page o|f video |
|000035c0| 6d 65 6d 6f 72 79 20 79 | 6f 75 27 72 65 20 69 6e |memory y|ou're in|
|000035d0| 74 65 72 65 73 74 65 64 | 20 69 6e 20 28 69 6e 20 |terested| in (in |
|000035e0| 74 68 65 20 63 75 72 72 | 65 6e 74 0d 76 69 64 65 |the curr|ent.vide|
|000035f0| 6f 20 6d 6f 64 65 29 2e | 20 49 74 20 74 65 6c 6c |o mode).| It tell|
|00003600| 73 20 79 6f 75 20 74 68 | 65 20 62 61 73 65 20 61 |s you th|e base a|
|00003610| 64 64 72 65 73 73 20 6f | 66 20 74 68 61 74 20 70 |ddress o|f that p|
|00003620| 61 67 65 2e 0d 0d 4f 53 | 45 72 72 20 47 44 47 72 |age...OS|Err GDGr|
|00003630| 61 79 50 61 67 65 28 47 | 44 48 61 6e 64 6c 65 20 |ayPage(G|DHandle |
|00003640| 64 65 76 69 63 65 2c 73 | 68 6f 72 74 20 70 61 67 |device,s|hort pag|
|00003650| 65 29 3b 0d 43 61 6c 6c | 73 20 63 73 63 47 72 61 |e);.Call|s cscGra|
|00003660| 79 50 61 67 65 2e 20 28 | 43 61 6c 6c 65 64 20 22 |yPage. (|Called "|
|00003670| 63 73 63 47 72 61 79 53 | 63 72 65 65 6e 22 20 69 |cscGrayS|creen" i|
|00003680| 6e 20 44 65 73 69 67 6e | 69 6e 67 20 43 61 72 64 |n Design|ing Card|
|00003690| 73 20 61 6e 64 20 44 72 | 69 76 65 72 73 2c 20 33 |s and Dr|ivers, 3|
|000036a0| 72 64 0d 45 64 2e 29 20 | 46 69 6c 6c 73 20 74 68 |rd.Ed.) |Fills th|
|000036b0| 65 20 73 70 65 63 69 66 | 69 65 64 20 70 61 67 65 |e specif|ied page|
|000036c0| 20 77 69 74 68 20 67 72 | 61 79 2c 20 69 2e 65 2e | with gr|ay, i.e.|
|000036d0| 20 74 68 65 20 64 69 74 | 68 65 72 65 64 20 64 65 | the dit|hered de|
|000036e0| 73 6b 74 6f 70 20 70 61 | 74 74 65 72 6e 2e 20 49 |sktop pa|ttern. I|
|000036f0| 27 6d 0d 6e 6f 74 20 61 | 77 61 72 65 20 6f 66 20 |'m.not a|ware of |
|00003700| 61 6e 79 20 70 61 72 74 | 69 63 75 6c 61 72 20 61 |any part|icular a|
|00003710| 64 76 61 6e 74 61 67 65 | 20 69 6e 20 75 73 69 6e |dvantage| in usin|
|00003720| 67 20 74 68 69 73 20 69 | 6e 73 74 65 61 64 20 6f |g this i|nstead o|
|00003730| 66 20 46 69 6c 6c 52 65 | 63 74 28 29 2e 0d 44 65 |f FillRe|ct()..De|
|00003740| 73 69 67 6e 69 6e 67 20 | 43 61 72 64 73 20 61 6e |signing |Cards an|
|00003750| 64 20 44 72 69 76 65 72 | 73 2c 20 33 72 64 20 45 |d Driver|s, 3rd E|
|00003760| 64 69 74 69 6f 6e 2c 20 | 43 68 61 70 74 65 72 20 |dition, |Chapter |
|00003770| 39 2c 20 73 61 79 73 20 | 74 68 61 74 20 66 6f 72 |9, says |that for|
|00003780| 20 64 69 72 65 63 74 0d | 64 65 76 69 63 65 73 2c | direct.|devices,|
|00003790| 20 69 2e 65 2e 20 3e 38 | 20 62 69 74 20 70 69 78 | i.e. >8| bit pix|
|000037a0| 65 6c 73 2c 20 74 68 65 | 20 64 72 69 76 65 72 20 |els, the| driver |
|000037b0| 77 69 6c 6c 20 61 6c 73 | 6f 20 6c 6f 61 64 20 61 |will als|o load a|
|000037c0| 20 6c 69 6e 65 61 72 2c | 0d 67 61 6d 6d 61 2d 63 | linear,|.gamma-c|
|000037d0| 6f 72 72 65 63 74 65 64 | 2c 20 67 72 61 79 20 63 |orrected|, gray c|
|000037e0| 6f 6c 6f 72 20 74 61 62 | 6c 65 2e 0d 0d 4f 53 45 |olor tab|le...OSE|
|000037f0| 72 72 20 47 44 52 65 73 | 65 74 28 47 44 48 61 6e |rr GDRes|et(GDHan|
|00003800| 64 6c 65 20 64 65 76 69 | 63 65 2c 20 73 68 6f 72 |dle devi|ce, shor|
|00003810| 74 20 2a 6d 6f 64 65 50 | 74 72 2c 20 73 68 6f 72 |t *modeP|tr, shor|
|00003820| 74 20 2a 70 61 67 65 50 | 74 72 2c 20 50 74 72 20 |t *pageP|tr, Ptr |
|00003830| 2a 62 61 73 65 41 64 64 | 72 50 74 72 29 3b 0d 43 |*baseAdd|rPtr);.C|
|00003840| 61 6c 6c 73 20 63 73 63 | 52 65 73 65 74 2e 20 49 |alls csc|Reset. I|
|00003850| 6e 69 74 69 61 6c 69 7a | 65 20 74 68 65 20 76 69 |nitializ|e the vi|
|00003860| 64 65 6f 20 63 61 72 64 | 20 74 6f 20 69 74 73 20 |deo card| to its |
|00003870| 73 74 61 72 74 75 70 20 | 73 74 61 74 65 2c 20 75 |startup |state, u|
|00003880| 73 75 61 6c 6c 79 20 31 | 20 62 69 74 0d 70 65 72 |sually 1| bit.per|
|00003890| 20 70 69 78 65 6c 2e 20 | 52 65 74 75 72 6e 73 20 | pixel. |Returns |
|000038a0| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 73 20 6f |the para|meters o|
|000038b0| 66 20 74 68 61 74 20 73 | 74 61 74 65 2e 0d 0d 4f |f that s|tate...O|
|000038c0| 53 45 72 72 20 47 44 53 | 65 74 44 65 66 61 75 6c |SErr GDS|etDefaul|
|000038d0| 74 4d 6f 64 65 28 47 44 | 48 61 6e 64 6c 65 20 64 |tMode(GD|Handle d|
|000038e0| 65 76 69 63 65 2c 73 68 | 6f 72 74 20 6d 6f 64 65 |evice,sh|ort mode|
|000038f0| 29 3b 0d 43 61 6c 6c 73 | 20 63 73 63 53 65 74 44 |);.Calls| cscSetD|
|00003900| 65 66 61 75 6c 74 2e 20 | 53 75 70 70 6f 73 65 64 |efault. |Supposed|
|00003910| 6c 79 2c 20 79 6f 75 20 | 74 65 6c 6c 20 69 74 20 |ly, you |tell it |
|00003920| 77 68 61 74 20 6d 6f 64 | 65 20 79 6f 75 20 77 61 |what mod|e you wa|
|00003930| 6e 74 20 74 6f 20 73 74 | 61 72 74 20 75 70 20 77 |nt to st|art up w|
|00003940| 69 74 68 0d 77 68 65 6e | 20 79 6f 75 20 72 65 62 |ith.when| you reb|
|00003950| 6f 6f 74 2e 20 28 49 27 | 76 65 20 6e 65 76 65 72 |oot. (I'|ve never|
|00003960| 20 62 65 65 6e 20 61 62 | 6c 65 20 74 6f 20 67 65 | been ab|le to ge|
|00003970| 74 20 74 68 69 73 20 74 | 6f 20 77 6f 72 6b 2e 20 |t this t|o work. |
|00003980| 4e 6f 20 65 72 72 6f 72 | 20 61 6e 64 20 6e 6f 0d |No error| and no.|
|00003990| 65 66 66 65 63 74 2e 20 | 50 65 72 68 61 70 73 20 |effect. |Perhaps |
|000039a0| 49 27 76 65 20 6d 69 73 | 75 6e 64 65 72 73 74 6f |I've mis|understo|
|000039b0| 6f 64 20 69 74 73 20 70 | 75 72 70 6f 73 65 2e 29 |od its p|urpose.)|
|000039c0| 0d 0d 4f 53 45 72 72 20 | 47 44 53 65 74 47 72 61 |..OSErr |GDSetGra|
|000039d0| 79 28 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |y(GDHand|le devic|
|000039e0| 65 2c 42 6f 6f 6c 65 61 | 6e 20 66 6c 61 67 29 3b |e,Boolea|n flag);|
|000039f0| 0d 43 61 6c 6c 73 20 63 | 73 63 53 65 74 47 72 61 |.Calls c|scSetGra|
|00003a00| 79 2e 20 53 65 74 20 67 | 72 61 79 20 66 6c 61 67 |y. Set g|ray flag|
|00003a10| 2e 20 30 20 66 6f 72 20 | 63 6f 6c 6f 72 2e 20 31 |. 0 for |color. 1|
|00003a20| 20 69 66 20 61 6c 6c 20 | 63 6f 6c 6f 72 73 20 6d | if all |colors m|
|00003a30| 61 70 70 65 64 20 74 6f | 0d 6c 75 6d 69 6e 61 6e |apped to|.luminan|
|00003a40| 63 65 2d 65 71 75 69 76 | 61 6c 65 6e 74 20 67 72 |ce-equiv|alent gr|
|00003a50| 61 79 20 74 6f 6e 65 73 | 2e 0d 0d 4f 53 45 72 72 |ay tones|...OSErr|
|00003a60| 20 47 44 53 65 74 49 6e | 74 65 72 72 75 70 74 28 | GDSetIn|terrupt(|
|00003a70| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|00003a80| 42 6f 6f 6c 65 61 6e 20 | 66 6c 61 67 29 3b 0d 43 |Boolean |flag);.C|
|00003a90| 61 6c 6c 73 20 63 73 63 | 53 65 74 49 6e 74 65 72 |alls csc|SetInter|
|00003aa0| 72 75 70 74 2e 20 53 65 | 74 20 66 6c 61 67 20 74 |rupt. Se|t flag t|
|00003ab0| 6f 20 31 20 74 6f 20 65 | 6e 61 62 6c 65 20 56 42 |o 1 to e|nable VB|
|00003ac0| 4c 20 69 6e 74 65 72 72 | 75 70 74 73 20 6f 66 20 |L interr|upts of |
|00003ad0| 74 68 69 73 20 63 61 72 | 64 2c 20 6f 72 20 30 0d |this car|d, or 0.|
|00003ae0| 74 6f 20 64 69 73 61 62 | 6c 65 2e 0d 0d 4f 53 45 |to disab|le...OSE|
|00003af0| 72 72 20 47 44 53 65 74 | 4d 6f 64 65 28 47 44 48 |rr GDSet|Mode(GDH|
|00003b00| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 2c 73 68 6f |andle de|vice,sho|
|00003b10| 72 74 20 6d 6f 64 65 2c | 73 68 6f 72 74 20 70 61 |rt mode,|short pa|
|00003b20| 67 65 2c 50 74 72 20 2a | 62 61 73 65 41 64 64 72 |ge,Ptr *|baseAddr|
|00003b30| 50 74 72 29 3b 0d 43 61 | 6c 6c 73 20 63 73 63 53 |Ptr);.Ca|lls cscS|
|00003b40| 65 74 4d 6f 64 65 2e 20 | 59 6f 75 20 74 65 6c 6c |etMode. |You tell|
|00003b50| 20 69 74 20 77 68 61 74 | 20 6d 6f 64 65 20 61 6e | it what| mode an|
|00003b60| 64 20 76 69 64 65 6f 20 | 70 61 67 65 20 79 6f 75 |d video |page you|
|00003b70| 20 77 61 6e 74 2e 20 49 | 74 20 73 65 74 73 20 27 | want. I|t sets '|
|00003b80| 65 6d 20 61 6e 64 0d 72 | 65 74 75 72 6e 73 20 74 |em and.r|eturns t|
|00003b90| 68 65 20 62 61 73 65 20 | 61 64 64 72 65 73 73 20 |he base |address |
|00003ba0| 6f 66 20 74 68 61 74 20 | 70 61 67 65 20 69 6e 20 |of that |page in |
|00003bb0| 76 69 64 65 6f 20 6d 65 | 6d 6f 72 79 2e 20 41 6c |video me|mory. Al|
|00003bc0| 73 6f 2c 20 62 65 63 61 | 75 73 65 20 41 70 70 6c |so, beca|use Appl|
|00003bd0| 65 20 73 61 69 64 0d 73 | 6f 2c 20 74 68 65 20 76 |e said.s|o, the v|
|00003be0| 69 64 65 6f 20 64 72 69 | 76 65 72 20 73 65 74 73 |ideo dri|ver sets|
|00003bf0| 20 74 68 65 20 65 6e 74 | 69 72 65 20 63 6c 75 74 | the ent|ire clut|
|00003c00| 20 74 6f 20 35 30 25 20 | 67 72 61 79 2e 20 4e 6f | to 50% |gray. No|
|00003c10| 74 65 20 74 68 61 74 20 | 74 68 69 73 20 63 68 61 |te that |this cha|
|00003c20| 6e 67 65 73 0d 74 68 69 | 6e 67 73 20 62 65 68 69 |nges.thi|ngs behi|
|00003c30| 6e 64 20 51 75 69 63 6b | 44 72 61 77 27 73 20 62 |nd Quick|Draw's b|
|00003c40| 61 63 6b 2e 20 46 6f 72 | 20 6d 6f 73 74 20 61 70 |ack. For| most ap|
|00003c50| 70 6c 69 63 61 74 69 6f | 6e 73 20 6c 69 66 65 20 |plicatio|ns life |
|00003c60| 77 69 6c 6c 20 62 65 20 | 73 69 6d 70 6c 65 72 20 |will be |simpler |
|00003c70| 69 66 0d 79 6f 75 20 6f | 76 65 72 74 6c 79 20 61 |if.you o|vertly a|
|00003c80| 73 6b 20 51 75 69 63 6b | 44 72 61 77 20 74 6f 20 |sk Quick|Draw to |
|00003c90| 74 61 6b 65 20 63 68 61 | 72 67 65 20 62 79 20 63 |take cha|rge by c|
|00003ca0| 61 6c 6c 69 6e 67 20 41 | 70 70 6c 65 27 73 20 53 |alling A|pple's S|
|00003cb0| 65 74 44 65 70 74 68 28 | 29 20 69 6e 73 74 65 61 |etDepth(|) instea|
|00003cc0| 64 0d 6f 66 20 47 44 53 | 65 74 4d 6f 64 65 28 29 |d.of GDS|etMode()|
|00003cd0| 2e 20 57 41 52 4e 49 4e | 47 3a 20 41 70 70 6c 65 |. WARNIN|G: Apple|
|00003ce0| 20 6e 6f 77 20 63 6f 6e | 73 69 64 65 72 73 20 74 | now con|siders t|
|00003cf0| 68 65 20 6d 6f 64 65 20 | 6e 75 6d 62 65 72 73 20 |he mode |numbers |
|00003d00| 6d 65 72 65 6c 79 20 6f | 72 64 69 6e 61 6c 2e 0d |merely o|rdinal..|
|00003d10| 45 2e 67 2e 20 6f 6e 20 | 74 68 65 20 38 a5 32 34 |E.g. on |the 8.24|
|00003d20| 20 76 69 64 65 6f 20 63 | 61 72 64 20 74 68 65 20 | video c|ard the |
|00003d30| 33 32 2d 62 69 74 20 6d | 6f 64 65 20 68 61 73 20 |32-bit m|ode has |
|00003d40| 6d 6f 64 65 20 6e 75 6d | 62 65 72 20 30 78 38 34 |mode num|ber 0x84|
|00003d50| 2c 20 6e 6f 74 20 30 78 | 38 35 20 61 73 0d 79 6f |, not 0x|85 as.yo|
|00003d60| 75 20 6d 69 67 68 74 20 | 68 61 76 65 20 65 78 70 |u might |have exp|
|00003d70| 65 63 74 65 64 20 6f 6e | 20 74 68 65 20 62 61 73 |ected on| the bas|
|00003d80| 69 73 20 6f 66 20 6f 6c | 64 20 41 70 70 6c 65 20 |is of ol|d Apple |
|00003d90| 64 6f 63 75 6d 65 6e 74 | 61 74 69 6f 6e 20 61 6e |document|ation an|
|00003da0| 64 20 6f 74 68 65 72 20 | 41 70 70 6c 65 0d 76 69 |d other |Apple.vi|
|00003db0| 64 65 6f 20 63 61 72 64 | 73 2e 0d 0d 4f 53 45 72 |deo card|s...OSEr|
|00003dc0| 72 20 47 44 53 77 69 74 | 63 68 4d 6f 64 65 28 47 |r GDSwit|chMode(G|
|00003dd0| 44 48 61 6e 64 6c 65 20 | 64 65 76 69 63 65 2c 73 |DHandle |device,s|
|00003de0| 68 6f 72 74 20 6d 6f 64 | 65 2c 6c 6f 6e 67 20 64 |hort mod|e,long d|
|00003df0| 69 73 70 6c 61 79 4d 6f | 64 65 49 44 2c 73 68 6f |isplayMo|deID,sho|
|00003e00| 72 74 20 70 61 67 65 2c | 50 74 72 20 2a 62 61 73 |rt page,|Ptr *bas|
|00003e10| 65 41 64 64 72 50 74 72 | 29 3b 0d 43 61 6c 6c 73 |eAddrPtr|);.Calls|
|00003e20| 20 63 73 63 53 77 69 74 | 63 68 4d 6f 64 65 20 61 | cscSwit|chMode a|
|00003e30| 73 20 64 6f 63 75 6d 65 | 6e 74 65 64 20 69 6e 20 |s docume|nted in |
|00003e40| 44 65 73 69 67 6e 69 6e | 67 20 50 43 49 20 56 69 |Designin|g PCI Vi|
|00003e50| 64 65 6f 20 43 61 72 64 | 73 20 61 6e 64 20 44 72 |deo Card|s and Dr|
|00003e60| 69 76 65 72 73 2e 20 50 | 43 49 0d 76 69 64 65 6f |ivers. P|CI.video|
|00003e70| 20 64 72 69 76 65 72 73 | 20 61 72 65 20 72 65 71 | drivers| are req|
|00003e80| 75 69 72 65 64 20 74 6f | 20 73 75 70 70 6f 72 74 |uired to| support|
|00003e90| 20 74 68 69 73 20 63 61 | 6c 6c 2e 20 49 74 27 73 | this ca|ll. It's|
|00003ea0| 20 6c 69 6b 65 20 47 44 | 53 65 74 4d 6f 64 65 2c | like GD|SetMode,|
|00003eb0| 20 62 75 74 20 61 64 64 | 69 74 69 6f 6e 61 6c 6c | but add|itionall|
|00003ec0| 79 0d 61 6c 6c 6f 77 73 | 20 79 6f 75 20 74 6f 20 |y.allows| you to |
|00003ed0| 73 70 65 63 69 66 79 20 | 74 68 65 20 64 69 73 70 |specify |the disp|
|00003ee0| 6c 61 79 4d 6f 64 65 49 | 44 2c 20 77 68 69 63 68 |layModeI|D, which|
|00003ef0| 20 64 65 74 65 72 6d 69 | 6e 65 73 20 74 68 65 20 | determi|nes the |
|00003f00| 73 70 61 74 69 61 6c 20 | 72 65 73 6f 6c 75 74 69 |spatial |resoluti|
|00003f10| 6f 6e 2e 0d 0d 4f 53 45 | 72 72 20 47 44 53 74 61 |on...OSE|rr GDSta|
|00003f20| 74 75 73 28 69 6e 74 20 | 72 65 66 4e 75 6d 2c 69 |tus(int |refNum,i|
|00003f30| 6e 74 20 63 73 43 6f 64 | 65 2c 50 74 72 20 63 73 |nt csCod|e,Ptr cs|
|00003f40| 50 61 72 61 6d 50 74 72 | 29 0d 55 73 65 73 20 6c |ParamPtr|).Uses l|
|00003f50| 6f 77 2d 6c 65 76 65 6c | 20 50 42 53 74 61 74 75 |ow-level| PBStatu|
|00003f60| 73 28 29 20 63 61 6c 6c | 20 74 6f 20 69 6d 70 6c |s() call| to impl|
|00003f70| 65 6d 65 6e 74 20 61 20 | 22 53 74 61 74 75 73 28 |ement a |"Status(|
|00003f80| 29 22 20 63 61 6c 6c 20 | 74 68 61 74 20 77 6f 72 |)" call |that wor|
|00003f90| 6b 73 21 20 54 68 65 0d | 6e 65 65 64 20 66 6f 72 |ks! The.|need for|
|00003fa0| 20 74 68 69 73 20 69 73 | 20 65 78 70 6c 61 69 6e | this is| explain|
|00003fb0| 65 64 20 69 6e 20 41 70 | 70 6c 65 20 54 65 63 68 |ed in Ap|ple Tech|
|00003fc0| 20 4e 6f 74 65 20 32 36 | 32 2c 20 77 68 69 63 68 | Note 26|2, which|
|00003fd0| 20 77 61 73 20 69 73 73 | 75 65 64 20 69 6e 20 72 | was iss|ued in r|
|00003fe0| 65 73 70 6f 6e 73 65 0d | 74 6f 20 6d 79 20 62 75 |esponse.|to my bu|
|00003ff0| 67 20 72 65 70 6f 72 74 | 20 69 6e 20 73 75 6d 6d |g report| in summ|
|00004000| 65 72 20 6f 66 20 27 38 | 39 2e 0d 0d 50 61 74 63 |er of '8|9...Patc|
|00004010| 68 4d 61 63 49 49 63 69 | 56 69 64 65 6f 44 72 69 |hMacIIci|VideoDri|
|00004020| 76 65 72 28 29 3b 0d 46 | 69 78 65 73 20 61 20 63 |ver();.F|ixes a c|
|00004030| 72 61 73 68 69 6e 67 20 | 62 75 67 20 69 6e 20 74 |rashing |bug in t|
|00004040| 68 65 20 4d 61 63 20 49 | 49 63 69 20 62 75 69 6c |he Mac I|Ici buil|
|00004050| 74 2d 69 6e 20 76 69 64 | 65 6f 20 64 72 69 76 65 |t-in vid|eo drive|
|00004060| 72 27 73 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |r's impl|ementati|
|00004070| 6f 6e 20 6f 66 0d 63 73 | 63 47 65 74 45 6e 74 72 |on of.cs|cGetEntr|
|00004080| 69 65 73 2e 20 54 68 65 | 20 70 61 74 63 68 20 70 |ies. The| patch p|
|00004090| 65 72 73 69 73 74 73 20 | 75 6e 74 69 6c 20 72 65 |ersists |until re|
|000040a0| 62 6f 6f 74 2e 20 49 74 | 20 69 73 20 75 6e 6c 69 |boot. It| is unli|
|000040b0| 6b 65 6c 79 20 74 68 61 | 74 20 79 6f 75 20 77 69 |kely tha|t you wi|
|000040c0| 6c 6c 20 6e 65 65 64 0d | 74 6f 20 63 61 6c 6c 20 |ll need.|to call |
|000040d0| 74 68 69 73 20 65 78 70 | 6c 69 63 69 74 6c 79 2c |this exp|licitly,|
|000040e0| 20 50 61 74 63 68 4d 61 | 63 49 49 63 69 56 69 64 | PatchMa|cIIciVid|
|000040f0| 65 6f 44 72 69 76 65 72 | 28 29 20 69 73 20 61 75 |eoDriver|() is au|
|00004100| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 69 6e 76 6f |tomatica|lly invo|
|00004110| 6b 65 64 20 74 68 65 0d | 66 69 72 73 74 20 74 69 |ked the.|first ti|
|00004120| 6d 65 20 47 44 47 65 74 | 45 6e 74 72 69 65 73 20 |me GDGet|Entries |
|00004130| 69 73 20 63 61 6c 6c 65 | 64 2e 20 54 68 65 20 4d |is calle|d. The M|
|00004140| 61 63 20 49 49 63 69 20 | 62 75 69 6c 74 2d 69 6e |ac IIci |built-in|
|00004150| 20 76 69 64 65 6f 20 64 | 72 69 76 65 72 0d 28 2e | video d|river.(.|
|00004160| 44 69 73 70 6c 61 79 5f | 56 69 64 65 6f 5f 41 70 |Display_|Video_Ap|
|00004170| 70 6c 65 5f 52 42 56 31 | 20 64 72 69 76 65 72 2c |ple_RBV1| driver,|
|00004180| 20 76 65 72 73 69 6f 6e | 20 30 29 20 68 61 73 20 | version| 0) has |
|00004190| 61 20 62 75 67 20 74 68 | 61 74 20 63 61 75 73 65 |a bug th|at cause|
|000041a0| 73 20 69 74 20 74 6f 20 | 63 72 61 73 68 0d 69 66 |s it to |crash.if|
|000041b0| 20 79 6f 75 20 74 72 79 | 20 74 6f 20 64 6f 20 61 | you try| to do a|
|000041c0| 20 63 73 63 47 65 74 45 | 6e 74 72 69 65 73 20 53 | cscGetE|ntries S|
|000041d0| 74 61 74 75 73 20 72 65 | 71 75 65 73 74 2e 20 50 |tatus re|quest. P|
|000041e0| 61 74 63 68 4d 61 63 49 | 49 63 69 56 69 64 65 6f |atchMacI|IciVideo|
|000041f0| 44 72 69 76 65 72 28 29 | 20 66 69 6e 64 73 20 61 |Driver()| finds a|
|00004200| 6e 64 0d 70 61 74 63 68 | 65 73 20 74 68 65 20 63 |nd.patch|es the c|
|00004210| 6f 70 79 20 6f 66 20 74 | 68 65 20 62 75 67 67 79 |opy of t|he buggy|
|00004220| 20 64 72 69 76 65 72 20 | 72 65 73 69 64 69 6e 67 | driver |residing|
|00004230| 20 69 6e 20 6d 65 6d 6f | 72 79 2e 20 28 49 66 20 | in memo|ry. (If |
|00004240| 74 68 65 20 64 72 69 76 | 65 72 20 69 73 0d 52 4f |the driv|er is.RO|
|00004250| 4d 2d 62 61 73 65 64 20 | 69 74 20 66 69 72 73 74 |M-based |it first|
|00004260| 20 6d 6f 76 65 73 20 69 | 74 20 74 6f 20 52 41 4d | moves i|t to RAM|
|00004270| 2c 20 61 6e 64 20 74 68 | 65 6e 20 70 61 74 63 68 |, and th|en patch|
|00004280| 65 73 20 74 68 61 74 2e | 29 20 4f 6e 6c 79 20 74 |es that.|) Only t|
|00004290| 77 6f 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 73 0d |wo instr|uctions.|
|000042a0| 61 72 65 20 6d 6f 64 69 | 66 69 65 64 2c 20 74 6f |are modi|fied, to|
|000042b0| 20 73 61 76 65 20 26 20 | 72 65 73 74 6f 72 65 20 | save & |restore |
|000042c0| 6d 6f 72 65 20 72 65 67 | 69 73 74 65 72 73 2e 20 |more reg|isters. |
|000042d0| 54 68 69 73 20 66 69 78 | 20 70 65 72 73 69 73 74 |This fix| persist|
|000042e0| 73 20 6f 6e 6c 79 20 75 | 6e 74 69 6c 20 74 68 65 |s only u|ntil the|
|000042f0| 0d 6e 65 78 74 20 72 65 | 62 6f 6f 74 2e 20 49 66 |.next re|boot. If|
|00004300| 20 74 68 65 20 70 61 74 | 63 68 20 69 73 20 73 75 | the pat|ch is su|
|00004310| 63 63 65 73 73 66 75 6c | 6c 79 20 61 70 70 6c 69 |ccessful|ly appli|
|00004320| 65 64 20 74 68 65 20 76 | 65 72 73 69 6f 6e 20 6e |ed the v|ersion n|
|00004330| 75 6d 62 65 72 20 69 73 | 20 69 6e 63 72 65 61 73 |umber is| increas|
|00004340| 65 64 0d 62 79 20 31 30 | 30 2e 0d 0d 4e 4f 54 45 |ed.by 10|0...NOTE|
|00004350| 53 3a 0d 0d 53 65 76 65 | 72 61 6c 20 62 75 67 73 |S:..Seve|ral bugs|
|00004360| 20 69 6e 20 76 65 72 73 | 69 6f 6e 20 32 20 28 69 | in vers|ion 2 (i|
|00004370| 6e 20 53 79 73 74 65 6d | 20 b2 36 2e 30 33 29 20 |n System| .6.03) |
|00004380| 6f 66 20 74 68 65 20 76 | 69 64 65 6f 20 64 72 69 |of the v|ideo dri|
|00004390| 76 65 72 20 66 6f 72 20 | 41 70 70 6c 65 27 73 0d |ver for |Apple's.|
|000043a0| 22 54 6f 62 79 20 46 72 | 61 6d 65 20 42 75 66 66 |"Toby Fr|ame Buff|
|000043b0| 65 72 22 20 76 69 64 65 | 6f 20 63 61 72 64 20 74 |er" vide|o card t|
|000043c0| 68 61 74 20 61 66 66 65 | 63 74 65 64 20 75 73 65 |hat affe|cted use|
|000043d0| 20 6f 66 20 74 68 65 20 | 47 65 74 47 61 6d 6d 61 | of the |GetGamma|
|000043e0| 20 63 61 6c 6c 20 77 65 | 72 65 0d 66 69 78 65 64 | call we|re.fixed|
|000043f0| 20 69 6e 20 76 65 72 73 | 69 6f 6e 20 33 20 28 69 | in vers|ion 3 (i|
|00004400| 6e 20 53 79 73 74 65 6d | 20 36 2e 30 34 29 2c 20 |n System| 6.04), |
|00004410| 61 70 70 61 72 65 6e 74 | 6c 79 20 69 6e 20 72 65 |apparent|ly in re|
|00004420| 73 70 6f 6e 73 65 20 74 | 6f 20 6d 79 20 62 75 67 |sponse t|o my bug|
|00004430| 20 72 65 70 6f 72 74 20 | 74 6f 0d 41 70 70 6c 65 | report |to.Apple|
|00004440| 2e 0d 0d 54 68 65 20 63 | 6f 6e 74 72 6f 6c 2f 73 |...The c|ontrol/s|
|00004450| 74 61 74 75 73 2d 63 61 | 6c 6c 20 70 61 72 61 6d |tatus-ca|ll param|
|00004460| 65 74 65 72 20 69 6e 20 | 61 20 47 44 43 6f 6e 74 |eter in |a GDCont|
|00004470| 72 6f 6c 20 6f 72 20 47 | 44 53 74 61 74 75 73 20 |rol or G|DStatus |
|00004480| 63 61 6c 6c 20 73 70 65 | 63 69 66 69 65 73 20 77 |call spe|cifies w|
|00004490| 68 61 74 0d 79 6f 75 20 | 77 61 6e 74 20 64 6f 6e |hat.you |want don|
|000044a0| 65 2e 20 53 65 65 20 44 | 65 73 69 67 6e 69 6e 67 |e. See D|esigning|
|000044b0| 20 43 61 72 64 73 20 61 | 6e 64 20 44 72 69 76 65 | Cards a|nd Drive|
|000044c0| 72 73 2c 20 33 72 64 20 | 45 64 69 74 69 6f 6e 2c |rs, 3rd |Edition,|
|000044d0| 20 43 68 61 70 74 65 72 | 20 39 2e 20 28 41 20 66 | Chapter| 9. (A f|
|000044e0| 65 77 0d 6e 65 77 20 63 | 61 6c 6c 73 20 61 72 65 |ew.new c|alls are|
|000044f0| 20 64 6f 63 75 6d 65 6e | 74 65 64 20 69 6e 20 74 | documen|ted in t|
|00004500| 68 65 20 44 69 73 70 6c | 61 79 20 44 65 76 69 63 |he Displ|ay Devic|
|00004510| 65 20 44 72 69 76 65 72 | 20 47 75 69 64 65 20 44 |e Driver| Guide D|
|00004520| 65 76 65 6c 6f 70 65 72 | 20 4e 6f 74 65 2e 29 0d |eveloper| Note.).|
|00004530| 20 4e 6f 74 65 20 74 68 | 61 74 20 73 6f 6d 65 74 | Note th|at somet|
|00004540| 69 6d 65 20 61 72 6f 75 | 6e 64 20 31 39 39 30 20 |ime arou|nd 1990 |
|00004550| 41 70 70 6c 65 20 72 65 | 6e 61 6d 65 64 20 73 6f |Apple re|named so|
|00004560| 6d 65 20 6f 66 20 74 68 | 65 20 43 6f 6e 74 72 6f |me of th|e Contro|
|00004570| 6c 20 61 6e 64 20 53 74 | 61 74 75 73 0d 63 61 6c |l and St|atus.cal|
|00004580| 6c 73 2c 20 67 69 76 69 | 6e 67 20 74 68 65 6d 20 |ls, givi|ng them |
|00004590| 6e 61 6d 65 73 20 74 68 | 61 74 20 62 65 74 74 65 |names th|at bette|
|000045a0| 72 20 72 65 66 6c 65 63 | 74 20 74 68 65 69 72 20 |r reflec|t their |
|000045b0| 66 75 6e 63 74 69 6f 6e | 2e 20 49 20 66 6f 6c 6c |function|. I foll|
|000045c0| 6f 77 65 64 20 73 75 69 | 74 2e 0d 48 6f 77 65 76 |owed sui|t..Howev|
|000045d0| 65 72 2c 20 41 70 70 6c | 65 20 6e 65 67 6c 65 63 |er, Appl|e neglec|
|000045e0| 74 65 64 20 74 6f 20 75 | 70 64 61 74 65 20 74 68 |ted to u|pdate th|
|000045f0| 65 69 72 20 62 6f 6f 6b | 2c 20 44 65 73 69 67 6e |eir book|, Design|
|00004600| 69 6e 67 20 43 61 72 64 | 73 20 61 6e 64 20 44 72 |ing Card|s and Dr|
|00004610| 69 76 65 72 73 2c 20 6e | 6f 77 0d 69 6e 20 69 74 |ivers, n|ow.in it|
|00004620| 73 20 33 72 64 20 65 64 | 69 74 69 6f 6e 2e 20 46 |s 3rd ed|ition. F|
|00004630| 6f 72 74 75 6e 61 74 65 | 6c 79 2c 20 74 68 65 79 |ortunate|ly, they|
|00004640| 20 64 65 66 69 6e 65 20 | 62 6f 74 68 20 6e 61 6d | define |both nam|
|00004650| 65 73 20 69 6e 20 74 68 | 65 69 72 20 56 69 64 65 |es in th|eir Vide|
|00004660| 6f 2e 68 20 68 65 61 64 | 65 72 0d 66 69 6c 65 2e |o.h head|er.file.|
|00004670| 20 54 6f 20 61 76 6f 69 | 64 20 63 6f 6e 66 75 73 | To avoi|d confus|
|00004680| 69 6f 6e 2c 20 68 65 72 | 65 20 61 72 65 20 74 68 |ion, her|e are th|
|00004690| 65 20 65 71 75 69 76 61 | 6c 65 6e 63 65 73 2e 20 |e equiva|lences. |
|000046a0| 4e 6f 74 65 20 74 68 61 | 74 20 22 63 73 63 22 20 |Note tha|t "csc" |
|000046b0| 73 74 61 6e 64 73 20 66 | 6f 72 0d 22 43 6f 6e 74 |stands f|or."Cont|
|000046c0| 72 6f 6c 20 61 6e 64 20 | 53 74 61 74 75 73 20 43 |rol and |Status C|
|000046d0| 61 6c 6c 22 0d 43 6f 6e | 74 72 6f 6c 20 63 61 6c |all".Con|trol cal|
|000046e0| 6c 3a 0d 20 63 73 63 47 | 72 61 79 50 61 67 65 20 |l:. cscG|rayPage |
|000046f0| 3d 20 20 63 73 63 47 72 | 61 79 53 63 72 65 65 6e |= cscGr|ayScreen|
|00004700| 20 3d 20 35 0d 53 74 61 | 74 75 73 20 63 61 6c 6c | = 5.Sta|tus call|
|00004710| 73 3a 0d 20 63 73 63 47 | 65 74 50 61 67 65 43 6e |s:. cscG|etPageCn|
|00004720| 74 20 3d 20 63 73 63 47 | 65 74 50 61 67 65 73 20 |t = cscG|etPages |
|00004730| 3d 20 34 0d 20 63 73 63 | 47 65 74 50 61 67 65 42 |= 4. csc|GetPageB|
|00004740| 61 73 65 20 3d 20 63 73 | 63 47 65 74 42 61 73 65 |ase = cs|cGetBase|
|00004750| 41 64 64 72 20 3d 20 35 | 0d 0d 42 61 73 65 64 20 |Addr = 5|..Based |
|00004760| 6f 6e 3a 0d 49 6e 73 69 | 64 65 20 4d 61 63 69 6e |on:.Insi|de Macin|
|00004770| 74 6f 73 68 2d 49 49 20 | 28 44 65 76 69 63 65 20 |tosh-II |(Device |
|00004780| 4d 61 6e 61 67 65 72 29 | 0d 44 65 73 69 67 6e 69 |Manager)|.Designi|
|00004790| 6e 67 20 43 61 72 64 73 | 20 61 6e 64 20 44 72 69 |ng Cards| and Dri|
|000047a0| 76 65 72 73 2c 20 33 72 | 64 20 45 64 69 74 69 6f |vers, 3r|d Editio|
|000047b0| 6e 2c 20 43 68 61 70 74 | 65 72 20 39 2e 0d 44 69 |n, Chapt|er 9..Di|
|000047c0| 73 70 6c 61 79 20 44 65 | 76 69 63 65 20 44 72 69 |splay De|vice Dri|
|000047d0| 76 65 72 20 47 75 69 64 | 65 20 44 65 76 65 6c 6f |ver Guid|e Develo|
|000047e0| 70 65 72 20 4e 6f 74 65 | 20 6f 6e 20 74 68 65 20 |per Note| on the |
|000047f0| 4a 61 6e 75 61 72 79 20 | 27 39 34 20 44 65 76 65 |January |'94 Deve|
|00004800| 6c 6f 70 65 72 20 43 44 | 2e 0d 54 65 63 68 20 4e |loper CD|..Tech N|
|00004810| 6f 74 65 20 32 36 32 3a | 20 22 43 6f 6e 74 72 6f |ote 262:| "Contro|
|00004820| 6c 6c 69 6e 67 20 53 74 | 61 74 75 73 20 43 61 6c |lling St|atus Cal|
|00004830| 6c 73 22 0d 22 47 72 65 | 79 53 63 61 6c 65 20 49 |ls"."Gre|yScale I|
|00004840| 6e 66 6f 72 6d 61 74 69 | 6f 6e 22 20 66 72 6f 6d |nformati|on" from|
|00004850| 20 41 70 70 6c 65 4c 69 | 6e 6b 20 22 41 70 70 6c | AppleLi|nk "Appl|
|00004860| 65 20 54 65 63 68 6e 69 | 63 61 6c 20 49 6e 66 6f |e Techni|cal Info|
|00004870| 22 0d 22 56 69 64 65 6f | 20 43 6f 6e 66 69 67 75 |"."Video| Configu|
|00004880| 72 61 74 69 6f 6e 20 52 | 4f 4d 20 53 6f 66 74 77 |ration R|OM Softw|
|00004890| 61 72 65 20 53 70 65 63 | 69 66 69 63 61 74 69 6f |are Spec|ificatio|
|000048a0| 6e 22 20 61 6c 73 6f 20 | 66 72 6f 6d 20 41 70 70 |n" also |from App|
|000048b0| 6c 65 4c 69 6e 6b 2c 0d | 69 6e 20 22 44 65 76 65 |leLink,.|in "Deve|
|000048c0| 6c 6f 70 65 72 20 54 65 | 63 68 20 53 75 70 70 6f |loper Te|ch Suppo|
|000048d0| 72 74 3a 4d 61 63 69 6e | 74 6f 73 68 3a 33 32 20 |rt:Macin|tosh:32 |
|000048e0| 42 69 74 20 51 75 69 63 | 6b 44 72 61 77 22 0d 0d |Bit Quic|kDraw"..|
|000048f0| 4e 4f 54 45 53 3a 0d 54 | 6f 6d 20 42 75 73 65 79 |NOTES:.T|om Busey|
|00004900| 20 28 62 75 73 65 79 40 | 69 6e 64 69 61 6e 61 2e | (busey@|indiana.|
|00004910| 65 64 75 29 20 77 72 69 | 74 65 73 3a 20 22 49 27 |edu) wri|tes: "I'|
|00004920| 6d 20 75 73 69 6e 67 20 | 61 6e 20 38 2d 62 69 74 |m using |an 8-bit|
|00004930| 20 53 75 70 65 72 4d 61 | 63 20 43 6f 6c 6f 72 43 | SuperMa|c ColorC|
|00004940| 61 72 64 0d 74 68 61 74 | 20 61 20 75 73 65 64 20 |ard.that| a used |
|00004950| 63 6f 6d 70 75 74 65 72 | 20 64 65 61 6c 65 72 20 |computer| dealer |
|00004960| 67 61 76 65 20 6d 65 20 | 77 68 65 6e 20 49 20 6f |gave me |when I o|
|00004970| 72 64 65 72 65 64 20 61 | 20 54 6f 62 79 20 63 61 |rdered a| Toby ca|
|00004980| 72 64 2e 20 49 20 64 69 | 73 63 6f 76 65 72 65 64 |rd. I di|scovered|
|00004990| 0d 74 68 61 74 20 74 68 | 65 20 73 74 61 74 75 73 |.that th|e status|
|000049a0| 20 61 6e 64 20 63 6f 6e | 74 72 6f 6c 20 63 61 6c | and con|trol cal|
|000049b0| 6c 73 20 66 6f 72 20 47 | 44 55 6e 63 6f 72 72 65 |ls for G|DUncorre|
|000049c0| 63 74 65 64 47 61 6d 6d | 61 20 72 65 74 75 72 6e |ctedGamm|a return|
|000049d0| 20 2d 31 37 20 61 6e 64 | 20 2d 31 38 0d 72 65 73 | -17 and| -18.res|
|000049e0| 70 65 63 74 69 76 65 6c | 79 2c 20 77 68 69 63 68 |pectivel|y, which|
|000049f0| 20 6d 65 61 6e 73 20 74 | 68 61 74 20 74 68 65 20 | means t|hat the |
|00004a00| 64 72 69 76 65 72 20 64 | 6f 65 73 6e 27 74 20 73 |driver d|oesn't s|
|00004a10| 75 70 70 6f 72 74 20 64 | 69 66 66 65 72 65 6e 74 |upport d|ifferent|
|00004a20| 20 67 61 6d 6d 61 73 2e | 0d 47 44 55 6e 63 6f 72 | gammas.|.GDUncor|
|00004a30| 72 65 63 74 65 64 47 61 | 6d 6d 61 20 72 65 74 75 |rectedGa|mma retu|
|00004a40| 72 6e 73 20 61 6e 20 65 | 72 72 6f 72 20 6d 65 73 |rns an e|rror mes|
|00004a50| 73 61 67 65 2c 20 62 75 | 74 20 47 44 4f 70 65 6e |sage, bu|t GDOpen|
|00004a60| 57 69 6e 64 6f 77 20 64 | 6f 65 73 6e 27 74 20 75 |Window d|oesn't u|
|00004a70| 73 65 20 74 68 65 0d 65 | 72 72 6f 72 20 6d 65 73 |se the.e|rror mes|
|00004a80| 73 61 67 65 20 6f 72 20 | 70 61 73 73 20 69 74 20 |sage or |pass it |
|00004a90| 62 61 63 6b 20 74 6f 20 | 74 68 65 20 63 61 6c 6c |back to |the call|
|00004aa0| 69 6e 67 20 70 72 6f 67 | 72 61 6d 2e 20 49 27 6d |ing prog|ram. I'm|
|00004ab0| 20 77 6f 6e 64 65 72 69 | 6e 67 20 69 66 20 74 68 | wonderi|ng if th|
|00004ac0| 65 72 65 20 61 72 65 0d | 70 65 6f 70 6c 65 20 75 |ere are.|people u|
|00004ad0| 73 69 6e 67 20 47 44 4f | 70 65 6e 57 69 6e 64 6f |sing GDO|penWindo|
|00004ae0| 77 20 77 68 6f 20 74 68 | 69 6e 6b 20 74 68 61 74 |w who th|ink that|
|00004af0| 20 74 68 65 79 20 61 72 | 65 20 67 65 74 74 69 6e | they ar|e gettin|
|00004b00| 67 20 61 20 6c 69 6e 65 | 61 72 20 67 61 6d 6d 61 |g a line|ar gamma|
|00004b10| 20 62 75 74 20 77 68 6f | 0d 61 72 65 20 61 63 74 | but who|.are act|
|00004b20| 75 61 6c 6c 79 20 67 65 | 74 74 69 6e 67 20 61 6e |ually ge|tting an|
|00004b30| 20 65 72 72 6f 72 20 6d | 65 73 73 61 67 65 20 61 | error m|essage a|
|00004b40| 6e 64 20 6e 6f 74 20 6c | 65 61 72 6e 69 6e 67 20 |nd not l|earning |
|00004b50| 61 62 6f 75 74 20 69 74 | 2e 22 0d 20 20 20 20 20 |about it|.". |
|00004b60| 54 6f 6d 27 73 20 66 61 | 63 74 73 20 61 72 65 20 |Tom's fa|cts are |
|00004b70| 72 69 67 68 74 2c 20 62 | 75 74 20 68 65 20 6e 65 |right, b|ut he ne|
|00004b80| 65 64 6e 27 74 20 77 6f | 72 72 79 2e 20 41 20 66 |edn't wo|rry. A f|
|00004b90| 65 77 20 76 69 64 65 6f | 20 64 72 69 76 65 72 73 |ew video| drivers|
|00004ba0| 2c 20 65 2e 67 2e 0d 52 | 61 64 69 75 73 20 50 6f |, e.g..R|adius Po|
|00004bb0| 77 65 72 56 69 65 77 2c | 20 61 6e 64 20 61 70 70 |werView,| and app|
|00004bc0| 61 72 65 6e 74 6c 79 20 | 74 68 65 20 53 75 70 65 |arently |the Supe|
|00004bd0| 72 4d 61 63 20 43 6f 6c | 6f 72 43 61 72 64 2c 20 |rMac Col|orCard, |
|00004be0| 64 6f 6e 27 74 20 69 6d | 70 6c 65 6d 65 6e 74 20 |don't im|plement |
|00004bf0| 67 61 6d 6d 61 0d 74 61 | 62 6c 65 73 20 61 74 20 |gamma.ta|bles at |
|00004c00| 61 6c 6c 2c 20 62 75 74 | 20 74 68 65 20 65 72 72 |all, but| the err|
|00004c10| 6f 72 20 66 72 6f 6d 20 | 47 44 55 6e 63 6f 72 72 |or from |GDUncorr|
|00004c20| 65 63 74 65 64 47 61 6d | 6d 61 20 69 73 20 70 72 |ectedGam|ma is pr|
|00004c30| 6f 62 61 62 6c 79 20 6e | 6f 74 20 61 20 63 6f 6e |obably n|ot a con|
|00004c40| 63 65 72 6e 2e 0d 54 68 | 65 20 72 65 61 6c 20 74 |cern..Th|e real t|
|00004c50| 65 73 74 20 69 73 20 74 | 6f 20 72 75 6e 20 54 69 |est is t|o run Ti|
|00004c60| 6d 65 56 69 64 65 6f 2e | 20 54 69 6d 65 56 69 64 |meVideo.| TimeVid|
|00004c70| 65 6f 20 64 6f 65 73 20 | 61 20 77 72 69 74 65 2d |eo does |a write-|
|00004c80| 61 6e 64 2d 72 65 61 64 | 2d 62 61 63 6b 20 74 65 |and-read|-back te|
|00004c90| 73 74 20 6f 66 0d 74 68 | 65 20 63 6c 75 74 20 6f |st of.th|e clut o|
|00004ca0| 66 20 79 6f 75 72 20 76 | 69 64 65 6f 20 63 61 72 |f your v|ideo car|
|00004cb0| 64 2e 20 49 66 20 74 68 | 61 74 20 74 65 73 74 20 |d. If th|at test |
|00004cc0| 70 61 73 73 65 73 20 74 | 68 65 6e 20 79 6f 75 20 |passes t|hen you |
|00004cd0| 63 61 6e 20 73 61 66 65 | 6c 79 20 63 6f 6e 63 6c |can safe|ly concl|
|00004ce0| 75 64 65 0d 74 68 61 74 | 20 74 68 65 72 65 27 73 |ude.that| there's|
|00004cf0| 20 6e 6f 20 67 61 6d 6d | 61 20 74 72 61 6e 73 6c | no gamm|a transl|
|00004d00| 61 74 69 6f 6e 20 67 6f | 69 6e 67 20 6f 6e 2e 20 |ation go|ing on. |
|00004d10| 53 6f 2c 20 61 73 20 6e | 65 61 72 6c 79 20 65 76 |So, as n|early ev|
|00004d20| 65 72 79 20 64 6f 63 75 | 6d 65 6e 74 20 69 6e 20 |ery docu|ment in |
|00004d30| 74 68 65 0d 56 69 64 65 | 6f 54 6f 6f 6c 62 6f 78 |the.Vide|oToolbox|
|00004d40| 20 73 61 79 73 3a 20 72 | 75 6e 20 54 69 6d 65 56 | says: r|un TimeV|
|00004d50| 69 64 65 6f 20 61 6e 64 | 20 72 65 61 64 20 74 68 |ideo and| read th|
|00004d60| 65 20 72 65 70 6f 72 74 | 2e 0d 20 20 20 20 20 48 |e report|.. H|
|00004d70| 65 72 65 27 73 20 68 6f | 77 20 67 61 6d 6d 61 20 |ere's ho|w gamma |
|00004d80| 74 61 62 6c 65 73 20 77 | 6f 72 6b 2e 20 41 63 63 |tables w|ork. Acc|
|00004d90| 6f 72 64 69 6e 67 20 74 | 6f 20 74 68 65 20 41 70 |ording t|o the Ap|
|00004da0| 70 6c 65 20 6d 61 6e 75 | 61 6c 20 28 44 65 73 69 |ple manu|al (Desi|
|00004db0| 67 6e 69 6e 67 0d 43 61 | 72 64 73 20 61 6e 64 20 |gning.Ca|rds and |
|00004dc0| 44 72 69 76 65 72 73 29 | 2c 20 74 68 65 20 76 61 |Drivers)|, the va|
|00004dd0| 6c 75 65 73 20 69 6e 20 | 74 68 65 20 72 67 62 20 |lues in |the rgb |
|00004de0| 74 72 69 70 6c 65 74 73 | 20 74 68 61 74 20 79 6f |triplets| that yo|
|00004df0| 75 20 73 75 70 70 6c 79 | 20 69 6e 20 61 0d 63 73 |u supply| in a.cs|
|00004e00| 63 53 65 74 45 6e 74 72 | 69 65 73 20 63 61 6c 6c |cSetEntr|ies call|
|00004e10| 20 74 6f 20 74 68 65 20 | 76 69 64 65 6f 20 64 72 | to the |video dr|
|00004e20| 69 76 65 72 20 61 72 65 | 20 66 69 72 73 74 20 74 |iver are| first t|
|00004e30| 72 61 6e 73 6c 61 74 65 | 64 20 76 69 61 20 74 68 |ranslate|d via th|
|00004e40| 65 20 67 61 6d 6d 61 20 | 74 61 62 6c 65 0d 28 65 |e gamma |table.(e|
|00004e50| 61 63 68 20 72 2c 67 2c | 20 61 6e 64 20 62 20 63 |ach r,g,| and b c|
|00004e60| 6f 6d 70 6f 6e 65 6e 74 | 20 73 65 70 61 72 61 74 |omponent| separat|
|00004e70| 65 6c 79 29 20 62 65 66 | 6f 72 65 20 62 65 69 6e |ely) bef|ore bein|
|00004e80| 67 20 6c 6f 61 64 65 64 | 20 69 6e 74 6f 20 74 68 |g loaded| into th|
|00004e90| 65 20 43 4c 55 54 0d 68 | 61 72 64 77 61 72 65 20 |e CLUT.h|ardware |
|00004ea0| 74 61 62 6c 65 2e 20 4d | 6f 73 74 20 64 72 69 76 |table. M|ost driv|
|00004eb0| 65 72 73 20 6d 61 69 6e | 74 61 69 6e 20 61 20 67 |ers main|tain a g|
|00004ec0| 61 6d 6d 61 20 74 61 62 | 6c 65 20 69 6e 74 65 72 |amma tab|le inter|
|00004ed0| 6e 61 6c 6c 79 20 28 69 | 6e 20 63 6f 6d 70 75 74 |nally (i|n comput|
|00004ee0| 65 72 0d 6d 65 6d 6f 72 | 79 29 20 61 6e 64 20 61 |er.memor|y) and a|
|00004ef0| 6c 6c 6f 77 20 79 6f 75 | 20 74 6f 20 67 65 74 20 |llow you| to get |
|00004f00| 61 6e 64 20 73 65 74 20 | 69 74 20 76 69 61 20 74 |and set |it via t|
|00004f10| 68 65 20 63 73 63 47 65 | 74 47 61 6d 6d 61 20 61 |he cscGe|tGamma a|
|00004f20| 6e 64 20 63 73 63 53 65 | 74 47 61 6d 6d 61 0d 63 |nd cscSe|tGamma.c|
|00004f30| 61 6c 6c 73 2e 20 41 20 | 66 65 77 20 76 69 64 65 |alls. A |few vide|
|00004f40| 6f 20 64 72 69 76 65 72 | 73 20 28 52 61 64 69 75 |o driver|s (Radiu|
|00004f50| 73 20 50 6f 77 65 72 56 | 69 65 77 2c 20 53 75 70 |s PowerV|iew, Sup|
|00004f60| 65 72 4d 61 63 20 43 6f | 6c 6f 72 43 61 72 64 29 |erMac Co|lorCard)|
|00004f70| 20 64 6f 6e 27 74 20 73 | 75 70 70 6f 72 74 0d 67 | don't s|upport.g|
|00004f80| 61 6d 6d 61 20 74 61 62 | 6c 65 73 2e 20 54 68 65 |amma tab|les. The|
|00004f90| 79 20 6c 6f 61 64 20 79 | 6f 75 72 20 72 67 62 20 |y load y|our rgb |
|00004fa0| 76 61 6c 75 65 73 20 64 | 69 72 65 63 74 6c 79 20 |values d|irectly |
|00004fb0| 69 6e 74 6f 20 74 68 65 | 20 43 4c 55 54 2c 20 77 |into the| CLUT, w|
|00004fc0| 69 74 68 6f 75 74 0d 74 | 72 61 6e 73 6c 61 74 69 |ithout.t|ranslati|
|00004fd0| 6f 6e 2e 20 48 6f 77 65 | 76 65 72 2c 20 66 6f 72 |on. Howe|ver, for|
|00004fe0| 20 75 73 65 72 73 20 6f | 66 20 74 68 65 20 56 69 | users o|f the Vi|
|00004ff0| 64 65 6f 54 6f 6f 6c 62 | 6f 78 20 74 68 61 74 27 |deoToolb|ox that'|
|00005000| 73 20 75 73 75 61 6c 6c | 79 20 66 69 6e 65 2c 20 |s usuall|y fine, |
|00005010| 73 69 6e 63 65 0d 74 68 | 61 74 27 73 20 65 78 61 |since.th|at's exa|
|00005020| 63 74 6c 79 20 74 68 65 | 20 62 65 68 61 76 69 6f |ctly the| behavio|
|00005030| 72 20 74 68 61 74 20 77 | 65 20 72 6f 75 74 69 6e |r that w|e routin|
|00005040| 65 6c 79 20 72 65 71 75 | 65 73 74 20 62 79 20 63 |ely requ|est by c|
|00005050| 61 6c 6c 69 6e 67 0d 47 | 44 55 6e 63 6f 72 72 65 |alling.G|DUncorre|
|00005060| 63 74 65 64 47 61 6d 6d | 61 2e 20 4f 66 20 63 6f |ctedGamm|a. Of co|
|00005070| 75 72 73 65 2c 20 69 66 | 20 79 6f 75 20 77 61 6e |urse, if| you wan|
|00005080| 74 20 74 6f 20 6c 6f 61 | 64 20 61 20 63 75 73 74 |t to loa|d a cust|
|00005090| 6f 6d 20 67 61 6d 6d 61 | 20 74 61 62 6c 65 2c 20 |om gamma| table, |
|000050a0| 6f 74 68 65 72 0d 74 68 | 61 6e 20 74 68 65 20 69 |other.th|an the i|
|000050b0| 64 65 6e 74 69 74 79 20 | 74 72 61 6e 73 66 6f 72 |dentity |transfor|
|000050c0| 6d 61 74 69 6f 6e 2c 20 | 74 68 65 6e 20 79 6f 75 |mation, |then you|
|000050d0| 27 6c 6c 20 62 65 20 63 | 61 6c 6c 69 6e 67 20 47 |'ll be c|alling G|
|000050e0| 44 53 65 74 47 61 6d 6d | 61 2c 20 61 6e 64 20 79 |DSetGamm|a, and y|
|000050f0| 6f 75 0d 73 68 6f 75 6c | 64 20 6d 61 6b 65 20 73 |ou.shoul|d make s|
|00005100| 75 72 65 20 69 74 20 64 | 6f 65 73 20 6e 6f 74 20 |ure it d|oes not |
|00005110| 72 65 74 75 72 6e 20 61 | 6e 20 65 72 72 6f 72 2e |return a|n error.|
|00005120| 20 28 41 6c 61 73 2c 20 | 74 68 65 20 52 61 64 69 | (Alas, |the Radi|
|00005130| 75 73 20 50 6f 77 65 72 | 56 69 65 77 20 64 72 69 |us Power|View dri|
|00005140| 76 65 72 0d 6d 6f 72 65 | 20 6f 72 20 6c 65 73 73 |ver.more| or less|
|00005150| 20 69 67 6e 6f 72 65 73 | 20 74 68 65 20 63 73 63 | ignores| the csc|
|00005160| 53 65 74 47 61 6d 6d 61 | 20 61 6e 64 20 63 73 63 |SetGamma| and csc|
|00005170| 47 65 74 47 61 6d 6d 61 | 20 72 65 71 75 65 73 74 |GetGamma| request|
|00005180| 73 2d 2d 47 44 47 65 74 | 47 61 6d 6d 61 0d 72 65 |s--GDGet|Gamma.re|
|00005190| 74 75 72 6e 73 20 61 20 | 74 61 62 6c 65 20 74 68 |turns a |table th|
|000051a0| 61 74 27 73 20 61 6c 6c | 20 7a 65 72 6f 65 73 2d |at's all| zeroes-|
|000051b0| 2d 62 75 74 20 74 68 65 | 20 64 72 69 76 65 72 20 |-but the| driver |
|000051c0| 66 61 69 6c 73 20 74 6f | 20 72 65 70 6f 72 74 20 |fails to| report |
|000051d0| 61 6e 20 65 72 72 6f 72 | 2e 20 49 0d 77 72 6f 74 |an error|. I.wrot|
|000051e0| 65 20 74 6f 20 74 68 65 | 20 52 61 64 69 75 73 20 |e to the| Radius |
|000051f0| 70 72 6f 67 72 61 6d 6d | 65 72 20 61 20 79 65 61 |programm|er a yea|
|00005200| 72 20 61 67 6f 2c 20 62 | 75 74 20 74 68 65 79 27 |r ago, b|ut they'|
|00005210| 72 65 20 6e 6f 20 6c 6f | 6e 67 65 72 20 69 6e 74 |re no lo|nger int|
|00005220| 65 72 65 73 74 65 64 20 | 69 6e 0d 77 6f 72 6b 69 |erested |in.worki|
|00005230| 6e 67 20 6f 6e 20 74 68 | 61 74 20 70 72 6f 64 75 |ng on th|at produ|
|00005240| 63 74 2e 29 0d 09 50 61 | 74 72 69 63 6b 20 46 6c |ct.)..Pa|trick Fl|
|00005250| 61 6e 61 67 61 6e 20 28 | 66 6c 61 6e 61 67 61 6e |anagan (|flanagan|
|00005260| 40 64 65 61 6b 69 6e 2e | 65 64 75 2e 61 75 29 20 |@deakin.|edu.au) |
|00005270| 77 72 69 74 65 73 3a 20 | 22 43 61 6e 20 49 20 62 |writes: |"Can I b|
|00005280| 65 20 31 30 30 25 20 73 | 75 72 65 2c 20 69 66 20 |e 100% s|ure, if |
|00005290| 49 0d 73 65 6c 65 63 74 | 20 22 53 70 65 63 69 61 |I.select| "Specia|
|000052a0| 6c 20 47 61 6d 6d 61 22 | 2c 20 69 6e 20 74 68 65 |l Gamma"|, in the|
|000052b0| 20 4d 6f 6e 69 74 6f 72 | 73 20 43 6f 6e 74 72 6f | Monitor|s Contro|
|000052c0| 6c 20 50 61 6e 65 6c 20 | 61 6e 64 20 63 68 6f 6f |l Panel |and choo|
|000052d0| 73 65 20 22 75 6e 63 6f | 72 72 65 63 74 65 64 0d |se "unco|rrected.|
|000052e0| 67 61 6d 6d 61 22 20 66 | 6f 72 20 61 20 76 69 64 |gamma" f|or a vid|
|000052f0| 65 6f 20 63 61 72 64 2c | 20 74 68 61 74 20 74 68 |eo card,| that th|
|00005300| 69 73 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |is is th|e same a|
|00005310| 73 20 75 73 69 6e 67 20 | 47 44 55 6e 63 6f 72 72 |s using |GDUncorr|
|00005320| 65 63 74 65 64 47 61 6d | 6d 61 3f 22 0d 52 45 50 |ectedGam|ma?".REP|
|00005330| 4c 59 3a 20 54 68 61 74 | 20 69 73 20 77 68 61 74 |LY: That| is what|
|00005340| 20 49 20 77 6f 75 6c 64 | 20 65 78 70 65 63 74 20 | I would| expect |
|00005350| 66 72 6f 6d 20 72 65 61 | 64 69 6e 67 20 61 6c 6c |from rea|ding all|
|00005360| 20 74 68 65 20 72 65 6c | 65 76 61 6e 74 20 64 6f | the rel|evant do|
|00005370| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 2e 0d 48 6f 77 |cumentat|ion..How|
|00005380| 65 76 65 72 2c 20 74 6f | 20 62 65 20 31 30 30 25 |ever, to| be 100%|
|00005390| 20 63 65 72 74 61 69 6e | 20 6f 66 20 61 6e 79 74 | certain| of anyt|
|000053a0| 68 69 6e 67 20 49 20 77 | 6f 75 6c 64 20 77 61 6e |hing I w|ould wan|
|000053b0| 74 20 74 6f 20 63 68 65 | 63 6b 20 69 74 20 6d 79 |t to che|ck it my|
|000053c0| 73 65 6c 66 2e 0d 54 69 | 6d 65 56 69 64 65 6f 20 |self..Ti|meVideo |
|000053d0| 63 61 6c 6c 73 20 47 44 | 55 6e 63 6f 72 72 65 63 |calls GD|Uncorrec|
|000053e0| 74 65 64 47 61 6d 6d 61 | 20 61 6e 64 20 74 68 65 |tedGamma| and the|
|000053f0| 6e 20 63 6f 6e 66 69 72 | 6d 73 20 74 68 61 74 20 |n confir|ms that |
|00005400| 77 72 69 74 65 2d 74 68 | 65 6e 2d 72 65 61 64 20 |write-th|en-read |
|00005410| 74 65 73 74 73 0d 6f 66 | 20 74 68 65 20 43 4c 55 |tests.of| the CLU|
|00005420| 54 20 72 65 74 75 72 6e | 20 77 68 61 74 20 77 61 |T return| what wa|
|00005430| 73 20 77 72 69 74 74 65 | 6e 2e 20 28 47 61 6d 6d |s writte|n. (Gamm|
|00005440| 61 2d 74 61 62 6c 65 20 | 74 72 61 6e 73 6c 61 74 |a-table |translat|
|00005450| 69 6f 6e 20 69 73 20 6f | 6e 6c 79 20 64 6f 6e 65 |ion is o|nly done|
|00005460| 20 6f 6e 0d 74 68 65 20 | 77 72 69 74 65 2c 20 6e | on.the |write, n|
|00005470| 6f 74 20 75 6e 64 6f 6e | 65 20 6f 6e 20 74 68 65 |ot undon|e on the|
|00005480| 20 72 65 61 64 2e 29 20 | 54 68 75 73 20 54 69 6d | read.) |Thus Tim|
|00005490| 65 56 69 64 65 6f 20 77 | 69 6c 6c 20 63 6f 6e 66 |eVideo w|ill conf|
|000054a0| 69 72 6d 20 66 6f 72 20 | 79 6f 75 20 74 68 61 74 |irm for |you that|
|000054b0| 0d 61 66 74 65 72 20 63 | 61 6c 6c 69 6e 67 20 47 |.after c|alling G|
|000054c0| 44 55 6e 63 6f 72 72 65 | 63 74 65 64 47 61 6d 6d |DUncorre|ctedGamm|
|000054d0| 61 20 79 6f 75 72 20 76 | 69 64 65 6f 20 63 61 72 |a your v|ideo car|
|000054e0| 64 20 68 61 73 20 77 68 | 61 74 20 41 70 70 6c 65 |d has wh|at Apple|
|000054f0| 20 63 61 6c 6c 73 20 61 | 6e 0d 22 75 6e 63 6f 72 | calls a|n."uncor|
|00005500| 72 65 63 74 65 64 22 20 | 67 61 6d 6d 61 20 74 61 |rected" |gamma ta|
|00005510| 62 6c 65 2e 20 48 6f 77 | 65 76 65 72 2c 20 54 69 |ble. How|ever, Ti|
|00005520| 6d 65 56 69 64 65 6f 20 | 64 6f 65 73 20 6e 6f 74 |meVideo |does not|
|00005530| 20 63 68 65 63 6b 20 77 | 68 61 74 20 79 6f 75 20 | check w|hat you |
|00005540| 77 6f 75 6c 64 20 67 65 | 74 0d 62 79 20 6d 65 72 |would ge|t.by mer|
|00005550| 65 6c 79 20 73 65 6c 65 | 63 74 69 6e 67 20 22 75 |ely sele|cting "u|
|00005560| 6e 63 6f 72 72 65 63 74 | 65 64 22 20 67 61 6d 6d |ncorrect|ed" gamm|
|00005570| 61 20 69 6e 20 74 68 65 | 20 4d 6f 6e 69 74 6f 72 |a in the| Monitor|
|00005580| 73 20 43 6f 6e 74 72 6f | 6c 20 50 61 6e 65 6c 2e |s Contro|l Panel.|
|00005590| 20 49 74 20 77 6f 75 6c | 64 0d 62 65 20 72 65 61 | It woul|d.be rea|
|000055a0| 73 6f 6e 61 62 6c 65 20 | 74 6f 20 61 73 73 75 6d |sonable |to assum|
|000055b0| 65 20 74 68 61 74 20 79 | 6f 75 20 77 6f 75 6c 64 |e that y|ou would|
|000055c0| 20 67 65 74 20 74 68 65 | 20 73 61 6d 65 20 72 65 | get the| same re|
|000055d0| 73 75 6c 74 20 73 69 6e | 63 65 20 4d 6f 6e 69 74 |sult sin|ce Monit|
|000055e0| 6f 72 73 0d 69 6e 74 65 | 72 61 63 74 73 20 77 69 |ors.inte|racts wi|
|000055f0| 74 68 20 74 68 65 20 76 | 69 64 65 6f 20 64 72 69 |th the v|ideo dri|
|00005600| 76 65 72 20 62 79 20 74 | 68 65 20 73 61 6d 65 20 |ver by t|he same |
|00005610| 43 6f 6e 74 72 6f 6c 20 | 61 6e 64 20 53 74 61 74 |Control |and Stat|
|00005620| 75 73 20 43 61 6c 6c 73 | 20 61 73 0d 47 44 56 69 |us Calls| as.GDVi|
|00005630| 64 65 6f 2e 63 20 64 6f | 65 73 2c 20 73 6f 20 69 |deo.c do|es, so i|
|00005640| 74 20 6d 75 73 74 20 75 | 73 65 20 74 68 65 20 73 |t must u|se the s|
|00005650| 61 6d 65 20 63 73 63 53 | 65 74 47 61 6d 6d 61 20 |ame cscS|etGamma |
|00005660| 63 61 6c 6c 20 61 73 20 | 69 73 20 75 73 65 64 20 |call as |is used |
|00005670| 62 79 0d 47 44 55 6e 63 | 6f 72 72 65 63 74 65 64 |by.GDUnc|orrected|
|00005680| 47 61 6d 6d 61 2e 0d 0d | 48 49 53 54 4f 52 59 3a |Gamma...|HISTORY:|
|00005690| 0d 39 2f 32 39 2f 38 39 | 20 09 64 67 70 09 61 64 |.9/29/89| .dgp.ad|
|000056a0| 64 65 64 20 63 61 75 74 | 69 6f 6e 20 61 62 6f 76 |ded caut|ion abov|
|000056b0| 65 20 74 68 61 74 20 73 | 75 63 63 65 73 73 69 76 |e that s|uccessiv|
|000056c0| 65 20 63 61 6c 6c 73 20 | 74 6f 20 63 73 63 53 65 |e calls |to cscSe|
|000056d0| 74 45 6e 74 72 69 65 73 | 20 6d 61 79 20 62 65 20 |tEntries| may be |
|000056e0| 6f 6e 20 6f 6e 65 20 0d | 09 09 09 09 66 72 61 6d |on one .|....fram|
|000056f0| 65 2e 0d 31 31 2f 32 31 | 2f 38 39 09 64 67 70 09 |e..11/21|/89.dgp.|
|00005700| 63 6f 72 72 65 63 74 65 | 64 20 6d 6f 64 65 20 6c |correcte|d mode l|
|00005710| 69 73 74 3a 20 30 78 38 | 30 2e 2e 2e 20 61 73 20 |ist: 0x8|0... as |
|00005720| 70 6f 69 6e 74 65 64 20 | 6f 75 74 20 62 79 20 43 |pointed |out by C|
|00005730| 68 75 63 6b 20 53 74 65 | 69 6e 0d 31 31 2f 33 30 |huck Ste|in.11/30|
|00005740| 2f 38 39 09 64 67 70 09 | 61 64 64 65 64 20 6e 6f |/89.dgp.|added no|
|00005750| 74 65 20 61 62 6f 76 65 | 20 66 72 6f 6d 20 44 6f |te above| from Do|
|00005760| 6e 20 4b 65 6c 6c 79 2e | 0d 09 09 09 09 41 64 64 |n Kelly.|.....Add|
|00005770| 65 64 20 63 61 75 74 69 | 6f 6e 61 72 79 20 6e 6f |ed cauti|onary no|
|00005780| 74 65 20 61 62 6f 76 65 | 20 61 62 6f 75 74 20 47 |te above| about G|
|00005790| 44 53 65 74 45 6e 74 72 | 69 65 73 28 29 2e 0d 33 |DSetEntr|ies()..3|
|000057a0| 2f 31 2f 39 30 09 09 64 | 67 70 09 75 70 64 61 74 |/1/90..d|gp.updat|
|000057b0| 65 64 20 63 6f 6d 6d 65 | 6e 74 73 2e 0d 33 2f 33 |ed comme|nts..3/3|
|000057c0| 2f 39 30 09 09 64 67 70 | 09 69 6e 63 6c 75 64 65 |/90..dgp|.include|
|000057d0| 64 20 56 69 64 65 6f 2e | 68 20 69 6e 73 74 65 61 |d Video.|h instea|
|000057e0| 64 20 6f 66 20 64 65 66 | 69 6e 69 6e 67 20 56 44 |d of def|ining VD|
|000057f0| 53 65 74 45 6e 74 72 79 | 52 65 63 6f 72 64 20 61 |SetEntry|Record a|
|00005800| 6e 64 20 56 44 50 61 67 | 65 49 6e 66 6f 2e 0d 33 |nd VDPag|eInfo..3|
|00005810| 2f 32 30 2f 39 30 09 09 | 64 67 70 09 6d 61 64 65 |/20/90..|dgp.made|
|00005820| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|00005830| 20 4d 50 57 20 43 2e 0d | 33 2f 32 33 2f 39 30 09 | MPW C..|3/23/90.|
|00005840| 09 64 67 70 09 63 68 61 | 6e 67 65 64 20 63 68 61 |.dgp.cha|nged cha|
|00005850| 72 20 74 6f 20 75 6e 73 | 69 67 6e 65 64 20 63 68 |r to uns|igned ch|
|00005860| 61 72 20 69 6e 20 56 44 | 44 65 66 4d 6f 64 65 52 |ar in VD|DefModeR|
|00005870| 65 63 0d 09 09 09 09 61 | 6e 64 20 56 44 46 6c 61 |ec.....a|nd VDFla|
|00005880| 67 52 65 63 20 74 6f 20 | 70 72 65 76 65 6e 74 20 |gRec to |prevent |
|00005890| 75 6e 64 65 73 69 72 61 | 62 6c 65 20 73 69 67 6e |undesira|ble sign|
|000058a0| 20 65 78 74 65 6e 73 69 | 6f 6e 2e 0d 34 2f 32 2f | extensi|on..4/2/|
|000058b0| 39 30 09 09 64 67 70 09 | 44 65 6c 65 74 65 64 20 |90..dgp.|Deleted |
|000058c0| 6d 6f 64 65 20 61 72 67 | 75 6d 65 6e 74 20 66 72 |mode arg|ument fr|
|000058d0| 6f 6d 20 47 44 47 72 61 | 79 53 63 72 65 65 6e 28 |om GDGra|yScreen(|
|000058e0| 29 2e 0d 37 2f 32 38 2f | 39 30 09 09 64 67 70 20 |)..7/28/|90..dgp |
|000058f0| 46 69 78 65 64 20 73 74 | 61 63 6b 20 6f 76 65 72 |Fixed st|ack over|
|00005900| 66 6c 6f 77 20 69 6e 20 | 47 44 47 72 61 79 53 63 |flow in |GDGraySc|
|00005910| 72 65 65 6e 2c 20 62 79 | 20 64 65 63 6c 61 72 69 |reen, by| declari|
|00005920| 6e 67 20 53 79 73 45 6e | 76 52 65 63 20 73 74 61 |ng SysEn|vRec sta|
|00005930| 74 69 63 2e 0d 31 30 2f | 32 30 2f 39 30 09 64 67 |tic..10/|20/90.dg|
|00005940| 70 09 41 70 70 6c 65 20 | 68 61 73 20 72 65 6e 61 |p.Apple |has rena|
|00005950| 6d 65 64 20 74 68 65 20 | 63 6f 6e 74 72 6f 6c 20 |med the |control |
|00005960| 61 6e 64 20 73 74 61 74 | 75 73 20 63 61 6c 6c 73 |and stat|us calls|
|00005970| 2c 20 73 6f 20 49 20 66 | 6f 6c 6c 6f 77 65 64 20 |, so I f|ollowed |
|00005980| 73 75 69 74 3a 0d 09 09 | 09 09 a5 47 44 47 65 74 |suit:...|...GDGet|
|00005990| 50 61 67 65 42 61 73 65 | 20 72 65 70 6c 61 63 65 |PageBase| replace|
|000059a0| 73 20 47 44 47 65 74 42 | 61 73 65 41 64 64 72 0d |s GDGetB|aseAddr.|
|000059b0| 09 09 09 09 a5 47 44 52 | 65 73 65 74 20 72 65 70 |.....GDR|eset rep|
|000059c0| 6c 61 63 65 73 20 47 44 | 49 6e 69 74 0d 09 09 09 |laces GD|Init....|
|000059d0| 09 a5 47 44 47 72 61 79 | 50 61 67 65 20 72 65 70 |..GDGray|Page rep|
|000059e0| 6c 61 63 65 20 47 44 47 | 72 61 79 53 63 72 65 65 |lace GDG|rayScree|
|000059f0| 6e 0d 09 09 09 09 a5 47 | 44 47 65 74 50 61 67 65 |n......G|DGetPage|
|00005a00| 43 6e 74 20 72 65 70 6c | 61 63 65 73 20 47 44 47 |Cnt repl|aces GDG|
|00005a10| 65 74 50 61 67 65 73 0d | 32 2f 31 32 2f 39 31 09 |etPages.|2/12/91.|
|00005a20| 09 64 67 70 20 44 69 73 | 63 6f 76 65 72 65 64 20 |.dgp Dis|covered |
|00005a30| 74 68 61 74 20 74 68 65 | 20 6f 6c 64 20 62 75 67 |that the| old bug|
|00005a40| 20 69 6e 20 47 44 47 72 | 61 79 50 61 67 65 20 69 | in GDGr|ayPage i|
|00005a50| 73 20 73 74 69 6c 6c 20 | 70 72 65 73 65 6e 74 20 |s still |present |
|00005a60| 69 6e 20 53 79 73 74 65 | 6d 0d 09 09 09 09 36 2e |in Syste|m.....6.|
|00005a70| 30 35 2c 20 73 6f 20 49 | 20 72 65 6d 6f 76 65 64 |05, so I| removed|
|00005a80| 20 74 68 65 20 63 6f 6e | 64 69 74 69 6f 6e 61 6c | the con|ditional|
|00005a90| 20 61 72 6f 75 6e 64 20 | 74 68 65 20 62 75 67 20 | around |the bug |
|00005aa0| 66 69 78 2e 20 54 65 73 | 74 47 44 56 69 64 65 6f |fix. Tes|tGDVideo|
|00005ab0| 0d 09 09 09 09 6e 6f 77 | 20 77 6f 72 6b 73 20 77 |.....now| works w|
|00005ac0| 69 74 68 3a 20 4d 61 63 | 20 49 49 20 56 69 64 65 |ith: Mac| II Vide|
|00005ad0| 6f 20 43 61 72 64 2c 20 | 4d 61 63 20 49 49 20 44 |o Card, |Mac II D|
|00005ae0| 69 73 70 6c 61 79 20 43 | 61 72 64 20 28 34 a5 38 |isplay C|ard (4.8|
|00005af0| 29 2c 20 0d 09 09 09 09 | 4d 61 63 20 49 49 63 69 |), .....|Mac IIci|
|00005b00| 20 42 75 69 6c 74 2d 69 | 6e 20 56 69 64 65 6f 2c | Built-i|n Video,|
|00005b10| 20 54 72 75 65 56 69 73 | 69 6f 6e 20 4e 75 56 69 | TrueVis|ion NuVi|
|00005b20| 73 74 61 2c 20 4d 61 63 | 20 49 49 73 69 20 42 75 |sta, Mac| IIsi Bu|
|00005b30| 69 6c 74 2d 69 6e 20 56 | 69 64 65 6f 2e 0d 37 2f |ilt-in V|ideo..7/|
|00005b40| 32 32 2f 39 31 09 09 64 | 67 70 09 43 68 61 6e 67 |22/91..d|gp.Chang|
|00005b50| 65 64 20 64 65 66 69 6e | 69 74 69 6f 6e 20 6f 66 |ed defin|ition of|
|00005b60| 20 63 73 47 54 61 62 6c | 65 20 66 72 6f 6d 20 47 | csGTabl|e from G|
|00005b70| 61 6d 6d 61 54 62 6c 50 | 74 72 20 74 6f 20 50 74 |ammaTblP|tr to Pt|
|00005b80| 72 2c 20 0d 09 09 09 09 | 74 6f 20 63 6f 6e 66 6f |r, .....|to confo|
|00005b90| 72 6d 20 77 69 74 68 20 | 4d 50 57 20 43 2e 0d 38 |rm with |MPW C..8|
|00005ba0| 2f 32 34 2f 39 31 09 09 | 64 67 70 09 4d 61 64 65 |/24/91..|dgp.Made|
|00005bb0| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|00005bc0| 20 54 48 49 4e 4b 20 43 | 20 35 2e 30 2e 0d 31 30 | THINK C| 5.0..10|
|00005bd0| 2f 32 32 2f 39 31 09 64 | 67 70 09 57 69 74 68 20 |/22/91.d|gp.With |
|00005be0| 68 65 6c 70 20 66 72 6f | 6d 20 42 61 72 74 20 46 |help fro|m Bart F|
|00005bf0| 61 72 65 6c 6c 2c 20 63 | 6f 6e 76 65 72 74 65 64 |arell, c|onverted|
|00005c00| 20 61 6c 6c 20 66 75 6e | 63 74 69 6f 6e 73 20 68 | all fun|ctions h|
|00005c10| 65 61 64 65 72 73 20 74 | 6f 0d 09 09 09 09 53 74 |eaders t|o.....St|
|00005c20| 61 6e 64 61 72 64 20 43 | 20 73 74 79 6c 65 2e 0d |andard C| style..|
|00005c30| 38 2f 32 36 2f 39 32 09 | 09 64 67 70 09 61 64 64 |8/26/92.|.dgp.add|
|00005c40| 65 64 20 61 20 66 65 77 | 20 6d 69 73 63 65 6c 6c |ed a few| miscell|
|00005c50| 61 6e 65 6f 75 73 20 63 | 6f 6d 6d 65 6e 74 73 0d |aneous c|omments.|
|00005c60| 09 09 09 09 49 6e 20 61 | 6c 6c 20 72 6f 75 74 69 |....In a|ll routi|
|00005c70| 6e 65 73 2c 20 2a 62 61 | 73 65 41 64 64 72 50 74 |nes, *ba|seAddrPt|
|00005c80| 72 20 69 73 20 6e 6f 77 | 20 73 65 74 20 6f 6e 6c |r is now| set onl|
|00005c90| 79 20 69 66 20 62 61 73 | 65 41 64 64 72 50 74 72 |y if bas|eAddrPtr|
|00005ca0| 20 69 73 20 6e 6f 74 20 | 4e 55 4c 4c 2e 0d 31 30 | is not |NULL..10|
|00005cb0| 2f 31 30 2f 39 32 09 64 | 67 70 09 41 64 64 65 64 |/10/92.d|gp.Added|
|00005cc0| 20 47 44 52 65 73 74 6f | 72 65 44 65 76 69 63 65 | GDResto|reDevice|
|00005cd0| 43 6c 75 74 28 29 2e 20 | 52 65 6d 6f 76 65 64 20 |Clut(). |Removed |
|00005ce0| 6f 62 73 6f 6c 65 74 65 | 20 73 75 70 70 6f 72 74 |obsolete| support|
|00005cf0| 20 66 6f 72 20 54 48 49 | 4e 4b 20 43 20 34 2e 0d | for THI|NK C 4..|
|00005d00| 31 31 2f 33 30 2f 39 32 | 09 64 67 70 20 63 6f 72 |11/30/92|.dgp cor|
|00005d10| 72 65 63 74 65 64 20 65 | 72 72 6f 72 20 69 6e 20 |rected e|rror in |
|00005d20| 63 6f 6d 6d 65 6e 74 20 | 64 6f 63 75 6d 65 6e 74 |comment |document|
|00005d30| 69 6e 67 20 76 61 6c 75 | 65 73 20 6f 66 20 61 72 |ing valu|es of ar|
|00005d40| 67 75 6d 65 6e 74 20 74 | 6f 20 47 44 53 65 74 47 |gument t|o GDSetG|
|00005d50| 72 61 79 28 29 2e 0d 09 | 09 09 09 53 65 74 20 66 |ray()...|...Set f|
|00005d60| 6c 61 67 20 74 6f 20 7a | 65 72 6f 20 66 6f 72 20 |lag to z|ero for |
|00005d70| 63 6f 6c 6f 72 2c 31 20 | 66 6f 72 20 6c 75 6d 69 |color,1 |for lumi|
|00005d80| 6e 61 6e 63 65 2d 6d 61 | 70 70 65 64 20 67 72 61 |nance-ma|pped gra|
|00005d90| 79 2e 0d 31 32 2f 39 2f | 39 32 09 09 64 67 70 09 |y..12/9/|92..dgp.|
|00005da0| 45 6e 68 61 6e 63 65 64 | 20 47 44 52 65 73 74 6f |Enhanced| GDResto|
|00005db0| 72 65 44 65 76 69 63 65 | 43 6c 75 74 28 29 2e 20 |reDevice|Clut(). |
|00005dc0| 50 61 73 73 69 6e 67 20 | 61 20 4e 55 4c 4c 20 61 |Passing |a NULL a|
|00005dd0| 72 67 75 6d 65 6e 74 20 | 6e 6f 77 20 72 65 71 75 |rgument |now requ|
|00005de0| 65 73 74 73 0d 09 09 09 | 09 61 70 70 6c 69 63 61 |ests....|.applica|
|00005df0| 74 69 6f 6e 20 74 6f 20 | 61 6c 6c 20 64 65 76 69 |tion to |all devi|
|00005e00| 63 65 73 2e 20 49 20 6f | 6e 6c 79 20 6a 75 73 74 |ces. I o|nly just|
|00005e10| 20 6c 65 61 72 6e 65 64 | 20 74 68 61 74 20 41 70 | learned| that Ap|
|00005e20| 70 6c 65 27 73 0d 09 09 | 09 09 52 65 73 74 6f 72 |ple's...|..Restor|
|00005e30| 65 44 65 76 69 63 65 43 | 6c 75 74 28 29 20 62 65 |eDeviceC|lut() be|
|00005e40| 68 61 76 65 73 20 69 6e | 20 74 68 69 73 20 77 61 |haves in| this wa|
|00005e50| 79 2e 0d 31 32 2f 31 35 | 2f 39 32 09 64 67 70 20 |y..12/15|/92.dgp |
|00005e60| 52 65 6e 61 6d 65 64 20 | 47 44 52 65 73 74 6f 72 |Renamed |GDRestor|
|00005e70| 65 44 65 76 69 63 65 43 | 6c 75 74 20 74 6f 20 47 |eDeviceC|lut to G|
|00005e80| 44 52 65 73 74 6f 72 65 | 44 65 76 69 63 65 43 6c |DRestore|DeviceCl|
|00005e90| 75 74 20 74 6f 20 62 65 | 20 63 6f 6e 73 69 73 74 |ut to be| consist|
|00005ea0| 65 6e 74 0d 09 09 09 09 | 77 69 74 68 20 41 70 70 |ent.....|with App|
|00005eb0| 6c 65 27 73 20 63 61 70 | 69 74 61 6c 69 7a 61 74 |le's cap|italizat|
|00005ec0| 69 6f 6e 20 6f 66 20 52 | 65 73 74 6f 72 65 44 65 |ion of R|estoreDe|
|00005ed0| 76 69 63 65 43 6c 75 74 | 2e 0d 31 32 2f 31 36 2f |viceClut|..12/16/|
|00005ee0| 39 32 09 64 67 70 20 55 | 70 64 61 74 65 64 20 63 |92.dgp U|pdated c|
|00005ef0| 6f 6d 6d 65 6e 74 73 20 | 74 6f 20 62 65 20 63 6f |omments |to be co|
|00005f00| 6e 73 69 73 74 65 6e 74 | 20 77 69 74 68 20 33 72 |nsistent| with 3r|
|00005f10| 64 20 65 64 69 74 69 6f | 6e 20 6f 66 20 44 65 73 |d editio|n of Des|
|00005f20| 69 67 6e 69 6e 67 20 43 | 61 72 64 73 0d 09 09 09 |igning C|ards....|
|00005f30| 09 61 6e 64 20 44 72 69 | 76 65 72 73 2e 20 a5 52 |.and Dri|vers. .R|
|00005f40| 65 6e 61 6d 65 64 20 6d | 79 47 44 48 61 6e 64 6c |enamed m|yGDHandl|
|00005f50| 65 20 74 6f 20 22 64 65 | 76 69 63 65 22 2c 20 77 |e to "de|vice", w|
|00005f60| 68 69 63 68 20 69 73 20 | 65 61 73 69 65 72 20 74 |hich is |easier t|
|00005f70| 6f 20 72 65 61 64 2e 0d | 09 09 09 09 52 65 6e 61 |o read..|....Rena|
|00005f80| 6d 65 64 20 47 44 4c 69 | 6e 65 61 72 47 61 6d 6d |med GDLi|nearGamm|
|00005f90| 61 20 74 6f 20 47 44 55 | 6e 63 6f 72 72 65 63 74 |a to GDU|ncorrect|
|00005fa0| 65 64 47 61 6d 6d 61 2c | 20 61 6e 64 20 67 65 6e |edGamma,| and gen|
|00005fb0| 65 72 61 6c 69 7a 65 64 | 20 69 74 0d 09 09 09 09 |eralized| it.....|
|00005fc0| 74 6f 20 77 6f 72 6b 20 | 77 69 74 68 20 61 6e 79 |to work |with any|
|00005fd0| 20 73 69 7a 65 20 44 41 | 43 2e 20 46 6f 72 20 63 | size DA|C. For c|
|00005fe0| 6f 6d 70 61 74 69 62 69 | 6c 69 74 79 20 77 69 74 |ompatibi|lity wit|
|00005ff0| 68 20 6f 6c 64 20 70 72 | 6f 67 72 61 6d 73 0d 09 |h old pr|ograms..|
|00006000| 09 09 09 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 2e |...Video|Toolbox.|
|00006010| 68 20 6e 6f 77 20 68 61 | 73 20 61 20 23 64 65 66 |h now ha|s a #def|
|00006020| 69 6e 65 20 73 74 61 74 | 65 6d 65 6e 74 20 6d 61 |ine stat|ement ma|
|00006030| 6b 69 6e 67 20 47 44 4c | 69 6e 65 61 72 47 61 6d |king GDL|inearGam|
|00006040| 6d 61 0d 09 09 09 09 61 | 6e 20 61 6c 69 61 73 20 |ma.....a|n alias |
|00006050| 66 6f 72 20 47 44 55 6e | 63 6f 72 72 65 63 74 65 |for GDUn|correcte|
|00006060| 64 47 61 6d 6d 61 2e 0d | 31 32 2f 33 30 2f 39 32 |dGamma..|12/30/92|
|00006070| 09 64 67 70 20 55 70 64 | 61 74 65 64 20 73 6f 6d |.dgp Upd|ated som|
|00006080| 65 20 6f 66 20 74 68 65 | 20 63 6f 6d 6d 65 6e 74 |e of the| comment|
|00006090| 73 2e 20 45 6c 69 6d 69 | 6e 61 74 65 64 20 46 69 |s. Elimi|nated Fi|
|000060a0| 6c 65 73 2e 68 2e 0d 31 | 32 2f 33 30 2f 39 32 09 |les.h..1|2/30/92.|
|000060b0| 64 67 70 20 55 73 65 20 | 47 44 43 6c 75 74 53 69 |dgp Use |GDClutSi|
|000060c0| 7a 65 28 29 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |ze() to |determin|
|000060d0| 65 20 63 6c 75 74 20 73 | 69 7a 65 2e 0d 31 2f 34 |e clut s|ize..1/4|
|000060e0| 2f 39 33 09 09 64 67 70 | 20 49 6e 20 47 44 43 6c |/93..dgp| In GDCl|
|000060f0| 75 74 53 69 7a 65 2c 20 | 63 68 65 63 6b 20 66 6f |utSize, |check fo|
|00006100| 72 20 66 69 78 65 64 54 | 79 70 65 2e 0d 31 2f 35 |r fixedT|ype..1/5|
|00006110| 2f 39 33 09 09 64 67 70 | 20 49 6e 20 47 44 43 6c |/93..dgp| In GDCl|
|00006120| 75 74 53 69 7a 65 2c 20 | 6f 6e 6c 79 20 73 65 74 |utSize, |only set|
|00006130| 20 6c 61 73 74 20 63 6c | 75 74 20 65 6e 74 72 79 | last cl|ut entry|
|00006140| 2e 0d 09 09 09 09 41 64 | 64 65 64 20 50 61 74 63 |......Ad|ded Patc|
|00006150| 68 4d 61 63 49 49 63 69 | 56 69 64 65 6f 44 72 69 |hMacIIci|VideoDri|
|00006160| 76 65 72 28 29 20 74 6f | 20 74 68 65 20 65 6e 64 |ver() to| the end|
|00006170| 20 6f 66 20 74 68 69 73 | 20 66 69 6c 65 2c 20 61 | of this| file, a|
|00006180| 6e 64 20 0d 09 09 09 09 | 61 75 74 6f 6d 61 74 69 |nd .....|automati|
|00006190| 63 61 6c 6c 79 20 69 6e | 76 6f 6b 65 20 69 74 20 |cally in|voke it |
|000061a0| 74 68 65 20 66 69 72 73 | 74 20 74 69 6d 65 20 47 |the firs|t time G|
|000061b0| 44 47 65 74 45 6e 74 72 | 69 65 73 20 69 73 20 63 |DGetEntr|ies is c|
|000061c0| 61 6c 6c 65 64 2e 0d 31 | 2f 36 2f 39 33 09 09 64 |alled..1|/6/93..d|
|000061d0| 67 70 09 43 6c 65 61 6e | 65 64 20 75 70 20 47 44 |gp.Clean|ed up GD|
|000061e0| 43 6c 75 74 53 69 7a 65 | 2e 20 49 74 20 6e 6f 77 |ClutSize|. It now|
|000061f0| 20 73 65 65 6d 73 20 74 | 6f 20 77 6f 72 6b 20 63 | seems t|o work c|
|00006200| 6f 72 72 65 63 74 6c 79 | 20 69 6e 20 74 68 65 20 |orrectly| in the |
|00006210| 64 69 72 65 63 74 20 6d | 6f 64 65 73 2e 0d 31 2f |direct m|odes..1/|
|00006220| 31 38 2f 39 33 09 64 67 | 70 09 53 70 72 75 63 65 |18/93.dg|p.Spruce|
|00006230| 64 20 75 70 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |d up the| documen|
|00006240| 74 61 74 69 6f 6e 2e 0d | 09 09 09 a5 41 64 64 65 |tation..|....Adde|
|00006250| 64 20 61 6c 6c 20 74 68 | 65 20 63 6f 64 65 20 66 |d all th|e code f|
|00006260| 6f 72 6d 65 72 6c 79 20 | 69 6e 20 47 44 49 64 65 |ormerly |in GDIde|
|00006270| 6e 74 69 66 79 2e 63 2c | 20 62 75 74 20 6f 6d 69 |ntify.c,| but omi|
|00006280| 74 74 65 64 20 74 68 65 | 20 6f 62 73 6f 6c 65 74 |tted the| obsolet|
|00006290| 65 20 0d 09 09 09 66 75 | 6e 63 74 69 6f 6e 20 47 |e ....fu|nction G|
|000062a0| 44 49 64 65 6e 74 69 66 | 79 28 29 2c 20 77 68 69 |DIdentif|y(), whi|
|000062b0| 63 68 20 73 69 6d 70 6c | 79 20 70 72 69 6e 74 65 |ch simpl|y printe|
|000062c0| 64 20 47 44 4e 61 6d 65 | 28 29 20 61 6e 64 20 47 |d GDName|() and G|
|000062d0| 44 56 65 72 73 69 6f 6e | 2e 0d 09 09 09 a5 45 6e |DVersion|......En|
|000062e0| 68 61 6e 63 65 64 20 47 | 44 47 65 74 45 6e 74 72 |hanced G|DGetEntr|
|000062f0| 69 65 73 28 29 20 74 6f | 20 61 76 6f 69 64 20 63 |ies() to| avoid c|
|00006300| 61 6c 6c 69 6e 67 20 64 | 72 69 76 65 72 73 20 74 |alling d|rivers t|
|00006310| 68 61 74 20 61 72 65 20 | 6b 6e 6f 77 6e 0d 09 09 |hat are |known...|
|00006320| 09 74 6f 20 63 72 61 73 | 68 2c 20 72 65 74 75 72 |.to cras|h, retur|
|00006330| 6e 69 6e 67 20 61 20 73 | 74 61 74 75 73 45 72 72 |ning a s|tatusErr|
|00006340| 20 69 6e 73 74 65 61 64 | 2e 0d 09 09 09 a5 52 65 | instead|......Re|
|00006350| 63 6f 64 65 64 20 50 61 | 74 63 68 4d 61 63 49 49 |coded Pa|tchMacII|
|00006360| 63 69 56 69 64 65 6f 44 | 72 69 76 65 72 28 29 20 |ciVideoD|river() |
|00006370| 73 6f 20 61 73 20 6e 6f | 74 20 74 6f 20 63 61 6c |so as no|t to cal|
|00006380| 6c 20 47 65 74 53 63 72 | 65 65 6e 44 65 76 69 63 |l GetScr|eenDevic|
|00006390| 65 2e 63 2e 0d 32 2f 31 | 2f 39 33 09 64 67 70 09 |e.c..2/1|/93.dgp.|
|000063a0| 46 69 78 65 64 20 65 6e | 64 6c 65 73 73 20 6c 6f |Fixed en|dless lo|
|000063b0| 6f 70 20 69 6e 20 50 61 | 74 63 68 4d 61 63 49 49 |op in Pa|tchMacII|
|000063c0| 63 69 56 69 64 65 6f 44 | 72 69 76 65 72 2e 20 45 |ciVideoD|river. E|
|000063d0| 6e 68 61 6e 63 65 64 20 | 74 6f 20 64 65 61 6c 20 |nhanced |to deal |
|000063e0| 77 69 74 68 0d 09 09 09 | 52 4f 4d 2d 62 61 73 65 |with....|ROM-base|
|000063f0| 64 20 64 72 69 76 65 72 | 73 20 61 73 20 77 65 6c |d driver|s as wel|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.